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 061c93c4d..08acc62e4 100644 --- a/clone/clone.d.ts +++ b/clone/clone.d.ts @@ -8,10 +8,18 @@ */ declare module "clone" { /** - * @param parent - * @param circular If not given, defaults to true in JS lib. + * @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(parent: Object, circular?: boolean): Object + function clone(val: T, circular?: boolean, depth?: number): T; + + module clone { + /** + * @param obj the object that you want to clone + */ + function clonePrototype(obj: T): T; + } export = clone } 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; 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 +} 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; 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; diff --git a/request/request-tests.ts b/request/request-tests.ts index 506205db8..64aef2a04 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: any) { + // 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; 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;