From 2c58fe95f6c13f6054bcea838e9e57fd70da1d55 Mon Sep 17 00:00:00 2001 From: progre Date: Sun, 16 Nov 2014 22:35:07 +0900 Subject: [PATCH 1/9] fix definition --- clone/clone.d.ts | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/clone/clone.d.ts b/clone/clone.d.ts index 061c93c4d..cf11069e0 100644 --- a/clone/clone.d.ts +++ b/clone/clone.d.ts @@ -7,11 +7,18 @@ * See clone JS source for API docs */ declare module "clone" { - /** - * @param parent - * @param circular If not given, defaults to true in JS lib. - */ - function clone(parent: Object, circular?: boolean): Object + var clone: { + /** + * @param val the value that you want to clone, any type allowed + * @param circular Call clone with circular set to false if you are certain that obj contains no circular references. This will give better performance if needed. There is no error if undefined or null is passed as obj. + * @param depth to wich the object is to be cloned (optional, defaults to infinity) + */ + (val: T, circular?: boolean, depth?: number): T; + /** + * @param obj the object that you want to clone + */ + clonePrototype(obj: T): T; + }; export = clone } From 26c17dce8da4e739784ef3d1c8afae2536f701db Mon Sep 17 00:00:00 2001 From: pspi Date: Mon, 17 Nov 2014 08:26:47 +0200 Subject: [PATCH 2/9] allow method chaining with .on() --- request/request-tests.ts | 7 +++++++ request/request.d.ts | 2 ++ 2 files changed, 9 insertions(+) diff --git a/request/request-tests.ts b/request/request-tests.ts index 506205db8..49a5775fe 100644 --- a/request/request-tests.ts +++ b/request/request-tests.ts @@ -197,3 +197,10 @@ r.post(str); r(options); r.get(options); r.post(options); + +request +.get('http://example.com/example.png') +.on('response', function(response) { + // check response +}) +.pipe(request.put('http://another.com/another.png')); diff --git a/request/request.d.ts b/request/request.d.ts index d8d058d1d..eff35ada6 100644 --- a/request/request.d.ts +++ b/request/request.d.ts @@ -110,6 +110,8 @@ declare module 'request' { oauth(oauth: OAuthOptions): Request; jar(jar: CookieJar): Request; + on(event: string, listener: Function): Request; + write(buffer: Buffer, cb?: Function): boolean; write(str: string, cb?: Function): boolean; write(str: string, encoding: string, cb?: Function): boolean; From ffd35dda9723f86348a35b93a105ebe8968cbe27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Panu=20Pitk=C3=A4m=C3=A4ki?= Date: Mon, 17 Nov 2014 08:53:31 +0200 Subject: [PATCH 3/9] fix travis, any check --- request/request-tests.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/request/request-tests.ts b/request/request-tests.ts index 49a5775fe..64aef2a04 100644 --- a/request/request-tests.ts +++ b/request/request-tests.ts @@ -200,7 +200,7 @@ r.post(options); request .get('http://example.com/example.png') -.on('response', function(response) { +.on('response', function(response: any) { // check response }) .pipe(request.put('http://another.com/another.png')); From dfbb155b89ed1279d259b1167d2eaadaf3041ddd Mon Sep 17 00:00:00 2001 From: Martin Jul Date: Mon, 17 Nov 2014 10:01:35 +0100 Subject: [PATCH 4/9] Corrected parameter name. --- react-addons/react-addons.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/react-addons/react-addons.d.ts b/react-addons/react-addons.d.ts index 456c9239e..245d339db 100644 --- a/react-addons/react-addons.d.ts +++ b/react-addons/react-addons.d.ts @@ -91,7 +91,7 @@ declare module React { findAllInRenderedTree(tree: ReactElement, test: (component: ReactElement) => boolean): ReactElement[]; scryRenderedDOMComponentsWithClass(tree: ReactElement, className: string): ReactElement[]; findRenderedDOMComponentWithClass(tree: ReactElement, className: string): ReactElement; - scryRenderedDOMComponentsWithTag(tree: ReactElement, className: string): ReactElement[]; + scryRenderedDOMComponentsWithTag(tree: ReactElement, tagName: string): ReactElement[]; findRenderedDOMComponentWithTag(tree: ReactElement, tagName: string): ReactElement; scryRenderedComponentsWithTag(tree: ReactElement, componentClass: Function): ReactElement[]; findRenderedComponentWithType

(tree: ReactElement, componentClass: ReactComponentFactory

): Component; From d4c49e7eff21c5bbfa91f125f15cd22aff125f1b Mon Sep 17 00:00:00 2001 From: Mikael Selander Date: Mon, 17 Nov 2014 10:44:23 +0100 Subject: [PATCH 5/9] Added inc overload that takes an amount --- nprogress/NProgress.d.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/nprogress/NProgress.d.ts b/nprogress/NProgress.d.ts index a86558aae..6bad4cfd1 100644 --- a/nprogress/NProgress.d.ts +++ b/nprogress/NProgress.d.ts @@ -23,6 +23,13 @@ interface NProgressStatic { */ inc(): NProgressStatic; + /** + * Increments the progress bar with a set amount. + * @param {number} amount This will get the current status value and adds the value until status is max 0.994 + * @returns {NProgressConfigureOptions} The current NProgress object, useful for chaining. + */ + inc(amount: number): NProgressStatic; + /** * Removes the progress indicator. */ @@ -102,4 +109,4 @@ interface NProgressConfigureOptions { template?: string; } -declare var NProgress: NProgressStatic; \ No newline at end of file +declare var NProgress: NProgressStatic; From 30c37d82b5bfba367983a489717d3dc76a873d50 Mon Sep 17 00:00:00 2001 From: Mikael Selander Date: Mon, 17 Nov 2014 10:47:33 +0100 Subject: [PATCH 6/9] Added test --- nprogress/NProgress-tests.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nprogress/NProgress-tests.ts b/nprogress/NProgress-tests.ts index d7ad68b39..3d07cafa2 100644 --- a/nprogress/NProgress-tests.ts +++ b/nprogress/NProgress-tests.ts @@ -3,6 +3,7 @@ function test_basics() { NProgress.start(); NProgress.inc(); + NProgress.inc(0.2); NProgress.done(); NProgress.set(0.5); @@ -29,4 +30,4 @@ function test_configuration() { trickleRate: 0.42, trickleSpeed: 42 }); -} \ No newline at end of file +} From 907856f4db0794716706156565c26fc724d8811a Mon Sep 17 00:00:00 2001 From: rushi216 Date: Mon, 17 Nov 2014 17:46:01 +0530 Subject: [PATCH 7/9] changed onpan function signature as it is called by x and y co-ordinates seperatly, not with object --- svg-pan-zoom/svg-pan-zoom.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/svg-pan-zoom/svg-pan-zoom.d.ts b/svg-pan-zoom/svg-pan-zoom.d.ts index 75f223d7e..4ff1000e4 100644 --- a/svg-pan-zoom/svg-pan-zoom.d.ts +++ b/svg-pan-zoom/svg-pan-zoom.d.ts @@ -18,7 +18,7 @@ declare module SvgPanZoom { beforeZoom?: (scale:number) => void; onZoom?: (scale:number) => void; beforePan?: (point:IPoint) => void; - onPan?: (point:IPoint) => void; + onPan?: (x:number, y:number) => void; refreshRate?: any; // in hz } @@ -55,7 +55,7 @@ declare module SvgPanZoom { setBeforePan(fn: (point:IPoint)=> void): void; - setOnPan(fn: (point:IPoint)=> void): void; + setOnPan(fn: (x:number, y:number)=> void): void; enableZoom(): void; From 9b15f26653178fd6dc139f405043583069b33cf3 Mon Sep 17 00:00:00 2001 From: cherrydev Date: Mon, 17 Nov 2014 14:37:56 -0800 Subject: [PATCH 8/9] Removed (very) obsolete toNot* wasNot* matchers --- jasmine/jasmine.d.ts | 5 ----- jasmine/legacy/jasmine-1.3.d.ts | 5 ----- 2 files changed, 10 deletions(-) diff --git a/jasmine/jasmine.d.ts b/jasmine/jasmine.d.ts index 04c4f4671..368b431d4 100644 --- a/jasmine/jasmine.d.ts +++ b/jasmine/jasmine.d.ts @@ -223,11 +223,8 @@ declare module jasmine { message(): any; toBe(expected: any): boolean; - toNotBe(expected: any): boolean; toEqual(expected: any): boolean; - toNotEqual(expected: any): boolean; toMatch(expected: any): boolean; - toNotMatch(expected: any): boolean; toBeDefined(): boolean; toBeUndefined(): boolean; toBeNull(): boolean; @@ -235,10 +232,8 @@ declare module jasmine { toBeTruthy(): boolean; toBeFalsy(): boolean; toHaveBeenCalled(): boolean; - wasNotCalled(): boolean; toHaveBeenCalledWith(...params: any[]): boolean; toContain(expected: any): boolean; - toNotContain(expected: any): boolean; toBeLessThan(expected: any): boolean; toBeGreaterThan(expected: any): boolean; toBeCloseTo(expected: any, precision: any): boolean; diff --git a/jasmine/legacy/jasmine-1.3.d.ts b/jasmine/legacy/jasmine-1.3.d.ts index 93aed2ffc..4a1b35707 100644 --- a/jasmine/legacy/jasmine-1.3.d.ts +++ b/jasmine/legacy/jasmine-1.3.d.ts @@ -215,11 +215,8 @@ declare module jasmine { message(): any; toBe(expected: any): boolean; - toNotBe(expected: any): boolean; toEqual(expected: any): boolean; - toNotEqual(expected: any): boolean; toMatch(expected: any): boolean; - toNotMatch(expected: any): boolean; toBeDefined(): boolean; toBeUndefined(): boolean; toBeNull(): boolean; @@ -227,10 +224,8 @@ declare module jasmine { toBeTruthy(): boolean; toBeFalsy(): boolean; toHaveBeenCalled(): boolean; - wasNotCalled(): boolean; toHaveBeenCalledWith(...params: any[]): boolean; toContain(expected: any): boolean; - toNotContain(expected: any): boolean; toBeLessThan(expected: any): boolean; toBeGreaterThan(expected: any): boolean; toBeCloseTo(expected: any, precision: any): boolean; From 22290a65aa51d3928cdba3d4624d0b7be0abbe7a Mon Sep 17 00:00:00 2001 From: progre Date: Tue, 18 Nov 2014 20:34:21 +0900 Subject: [PATCH 9/9] fix: better definition --- clone/clone-tests.ts | 3 ++- clone/clone.d.ts | 19 ++++++++++--------- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/clone/clone-tests.ts b/clone/clone-tests.ts index 12a853534..6a25fb7c3 100644 --- a/clone/clone-tests.ts +++ b/clone/clone-tests.ts @@ -6,4 +6,5 @@ var original = { var copy = clone(original); copy = clone(original, false); -copy = clone(original, true); +copy = clone(original, true, 1); +copy = clone.clonePrototype(original); diff --git a/clone/clone.d.ts b/clone/clone.d.ts index cf11069e0..08acc62e4 100644 --- a/clone/clone.d.ts +++ b/clone/clone.d.ts @@ -7,18 +7,19 @@ * See clone JS source for API docs */ declare module "clone" { - var clone: { - /** - * @param val the value that you want to clone, any type allowed - * @param circular Call clone with circular set to false if you are certain that obj contains no circular references. This will give better performance if needed. There is no error if undefined or null is passed as obj. - * @param depth to wich the object is to be cloned (optional, defaults to infinity) - */ - (val: T, circular?: boolean, depth?: number): T; + /** + * @param val the value that you want to clone, any type allowed + * @param circular Call clone with circular set to false if you are certain that obj contains no circular references. This will give better performance if needed. There is no error if undefined or null is passed as obj. + * @param depth to wich the object is to be cloned (optional, defaults to infinity) + */ + function clone(val: T, circular?: boolean, depth?: number): T; + + module clone { /** * @param obj the object that you want to clone */ - clonePrototype(obj: T): T; - }; + function clonePrototype(obj: T): T; + } export = clone }