/* ***************************************************************************** Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT. See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */ // Typing for the jQuery library /* Interface for the AJAX setting that will configure the AJAX request */ interface JQueryAjaxSettings { accepts?: any; async?: boolean; beforeSend?(jqXHR: JQueryXHR, settings: JQueryAjaxSettings): boolean; cache?: boolean; complete?(jqXHR: JQueryXHR, textStatus: string): any; contents?: { [key: string]: any }; // JQuery in the code compares contentType with a boolean value false // to check, whether to add default "Content-Type" or not. // Correct use: // contentType: "text/plain" // contentType: false contentType?: any; context?: any; converters?: { [key: string]: any }; crossDomain?: boolean; data?: any; dataFilter?(data: any, ty: any): any; dataType?: string; error?(jqXHR: JQueryXHR, textStatus: string, errorThrow: string): any; global?: boolean; headers?: { [key: string]: any }; ifModified?: boolean; isLocal?: boolean; jsonp?: string; jsonpCallback?: any; mimeType?: string; password?: string; processData?: boolean; scriptCharset?: string; statusCode?: { [key: string]: any }; success?(data: any, textStatus: string, jqXHR: JQueryXHR): void; timeout?: number; traditional?: boolean; type?: string; url?: string; username?: string; xhr?: any; xhrFields?: { [key: string]: any }; } interface JQueryPromiseXHRDoneCallback { (data: T, textStatus: string, jqXHR: JQueryXHR): void; } interface JQueryPromiseXHRFailCallback { (jqXHR: JQueryXHR, textStatus: string, errorThrown: any): void; } /* Interface for the jqXHR object */ interface JQueryXHR extends XMLHttpRequest { always(...alwaysCallbacks: Array<{ (): void }>): JQueryXHR; done(...doneCallbacks: Array>): JQueryXHR; fail(...failCallbacks: Array>): JQueryXHR; progress(...progressCallbacks: Array<{ (): void }>): JQueryXHR; state(): string; promise(target?: any): JQueryXHR; then( doneCallbacks: JQueryPromiseXHRDoneCallback, failCallbacks?: JQueryPromiseXHRFailCallback, progressCallbacks?: { (): void } ): JQueryPromise; then( doneCallbacks: { (data: T, textStatus: string, jqXHR: JQueryXHR): UValue }, failCallbacks?: JQueryPromiseXHRFailCallback, progressCallbacks?: { (): void } ): JQueryPromiseV; then( doneCallbacks: { (data: T, textStatus: string, jqXHR: JQueryXHR): UValue }, failCallbacks?: { (data: T, textStatus: string, jqXHR: JQueryXHR): UReject }, progressCallbacks?: { (): void } ): JQueryPromiseVR; then( doneCallbacks: JQueryPromiseXHRDoneCallback, failCallbacks?: { (data: T, textStatus: string, jqXHR: JQueryXHR): UReject }, progressCallbacks?: { (): void } ): JQueryPromiseR; overrideMimeType(mimeType: string): void; abort(statusText?: string): void; } /* Interface for the JQuery callback */ interface JQueryCallback { add(...callbacks: Array<{ (): void }>): JQueryCallback; add(callbacks: Array<{ (): void }>): JQueryCallback; disable(): JQueryCallback; disabled(): boolean; empty(): JQueryCallback; fire(): JQueryCallback; fired(): boolean; fireWith(context: any): JQueryCallback; has(callback: { (): void }): boolean; lock(): JQueryCallback; locked(): boolean; remove(...callbacks: Array<{ (): void }>): JQueryCallback; remove(callbacks: Array<{ (): void }>): JQueryCallback; } interface JQueryCallback1 { add(...callbacks: Array<{ (arg: T): void }>): JQueryCallback1; add(callbacks: Array<{ (arg: T): void }>): JQueryCallback1; disable(): JQueryCallback1; disabled(): boolean; empty(): JQueryCallback1; fire(arg: T): JQueryCallback1; fired(): boolean; fireWith(context: any, args: any[]): JQueryCallback1; has(callback: { (arg: T): void }): boolean; lock(): JQueryCallback1; locked(): boolean; remove(...callbacks: Array<{ (arg: T): void }>): JQueryCallback1; remove(callbacks: Array<{ (arg: T): void }>): JQueryCallback1; } interface JQueryCallback2 { add(...callbacks: Array<{ (arg1: T1, arg2: T2): void }>): JQueryCallback2; add(callbacks: Array<{ (arg1: T1, arg2: T2): void }>): JQueryCallback2; disable(): JQueryCallback2; disabled(): boolean; empty(): JQueryCallback2; fire(arg1: T1, arg2: T2): JQueryCallback2; fired(): boolean; fireWith(context: any, args: any[]): JQueryCallback2; has(callback: { (arg1: T1, arg2: T2): void }): boolean; lock(): JQueryCallback2; locked(): boolean; remove(...callbacks: Array<{ (arg1: T1, arg2: T2): void }>): JQueryCallback2; remove(callbacks: Array<{ (arg1: T1, arg2: T2): void }>): JQueryCallback2; } interface JQueryCallback3 { add(...callbacks: Array<{ (arg1: T1, arg2: T2, arg3: T3): void }>): JQueryCallback3; add(callbacks: Array<{ (arg1: T1, arg2: T2, arg3: T3): void }>): JQueryCallback3; disable(): JQueryCallback3; disabled(): boolean; empty(): JQueryCallback3; fire(arg1: T1, arg2: T2, arg3: T3): JQueryCallback3; fired(): boolean; fireWith(context: any, args: any[]): JQueryCallback3; has(callback: { (arg1: T1, arg2: T2, arg3: T3): void }): boolean; lock(): JQueryCallback3; locked(): boolean; remove(...callbacks: Array<{ (arg1: T1, arg2: T2, arg3: T3): void }>): JQueryCallback3; remove(callbacks: Array<{ (arg1: T1, arg2: T2, arg3: T3): void }>): JQueryCallback3; } interface JQueryCallback4 { add(...callbacks: Array<{ (arg1: T1, arg2: T2, arg3: T3, arg4: T4): void }>): JQueryCallback4; add(callbacks: Array<{ (arg1: T1, arg2: T2, arg3: T3, arg4: T4): void }>): JQueryCallback4; disable(): JQueryCallback4; disabled(): boolean; empty(): JQueryCallback4; fire(arg1: T1, arg2: T2, arg3: T3, arg4: T4): JQueryCallback4; fired(): boolean; fireWith(context: any, args: any[]): JQueryCallback4; has(callback: { (arg1: T1, arg2: T2, arg3: T3, arg4: T4): void }): boolean; lock(): JQueryCallback4; locked(): boolean; remove(...callbacks: Array<{ (arg1: T1, arg2: T2, arg3: T3, arg4: T4): void }>): JQueryCallback4; remove(callbacks: Array<{ (arg1: T1, arg2: T2, arg3: T3, arg4: T4): void }>): JQueryCallback4; } /* Interface for the JQuery promise, part of callbacks */ interface JQueryPromiseAny { always(...alwaysCallbacks: { (...args: any[]): void }[]): JQueryPromiseAny; done(...doneCallbacks: { (...args: any[]): void }[]): JQueryPromiseAny; fail(...failCallbacks: { (...args: any[]): void }[]): JQueryPromiseAny; progress(...progressCallbacks: { (...args: any[]): void }[]): JQueryPromiseAny; state(): string; promise(target?: any): JQueryPromiseAny; then( doneCallbacks: { (...args: any[]): any }, failCallbacks: { (...args: any[]): any }, progressCallbacks?: { (...args: any[]): any } ): JQueryPromiseAny; } interface JQueryPromise { always(...alwaysCallbacks: Array<{ (): void }>): JQueryPromise; done(...doneCallbacks: Array<{ (): void }>): JQueryPromise; fail(...failCallbacks: Array<{ (): void }>): JQueryPromise; progress(...progressCallbacks: Array<{ (): void }>): JQueryPromise; state(): string; promise(target?: any): JQueryPromise; then( doneCallbacks: { (): UValue }, failCallbacks: { (): UReject }, progressCallbacks?: { (): void } ): JQueryPromiseVR; // U Pipe then( doneCallbacks: { (): JQueryPromiseV }, failCallbacks?: { (): void }, progressCallbacks?: { (): void } ): JQueryPromiseV; then( doneCallbacks: { (): JQueryDeferred }, failCallbacks?: { (): void }, progressCallbacks?: { (): void } ): JQueryPromise; then( doneCallbacks: { (): JQueryPromise }, failCallbacks?: { (): void }, progressCallbacks?: { (): void } ): JQueryPromise; // U Value then( doneCallbacks: { (): UValue }, failCallbacks?: { (): void }, progressCallbacks?: { (): void } ): JQueryPromiseV; then( doneCallbacks: { (): void }, failCallbacks: { (): UReject }, progressCallbacks?: { (): void } ): JQueryPromiseR; then(doneCallbacks: { (): void }, failCallbacks?: { (): void }, progressCallbacks?: { (): void }): JQueryPromise; } interface JQueryPromiseV { always(...alwaysCallbacks: Array<{ (): void }>): JQueryPromiseV; done(...doneCallbacks: Array<{ (arg: TValue): void }>): JQueryPromiseV; fail(...failCallbacks: Array<{ (): void }>): JQueryPromiseV; progress(...progressCallbacks: Array<{ (): void }>): JQueryPromiseV; state(): string; promise(target?: any): JQueryPromiseV; then( doneCallbacks: { (arg: TValue): UValue }, failCallbacks: { (): UReject }, progressCallbacks?: { (): void } ): JQueryPromiseVR; // U Pipe then( doneCallbacks: { (arg: TValue): JQueryDeferredV }, failCallbacks?: { (): void }, progressCallbacks?: { (): void } ): JQueryPromiseV; then( doneCallbacks: { (arg: TValue): JQueryPromiseV }, failCallbacks?: { (): void }, progressCallbacks?: { (): void } ): JQueryPromiseV; // U Value then( doneCallbacks: { (arg: TValue): UValue }, failCallbacks?: { (): void }, progressCallbacks?: { (): void } ): JQueryPromiseV; then( doneCallbacks: { (arg: TValue): void }, failCallbacks: { (): UReject }, progressCallbacks?: { (): void } ): JQueryPromiseR; then( doneCallbacks: { (arg: TValue): void }, failCallbacks?: { (): void }, progressCallbacks?: { (): void } ): JQueryPromise; } interface JQueryPromiseN { always(...alwaysCallbacks: Array<{ (): void }>): JQueryPromiseN; done(...doneCallbacks: Array<{ (): void }>): JQueryPromiseN; fail(...failCallbacks: Array<{ (): void }>): JQueryPromiseN; progress(...progressCallbacks: Array<{ (arg: TNotify): void }>): JQueryPromiseN; state(): string; promise(target?: any): JQueryPromiseN; then( doneCallbacks: { (): UValue }, failCallbacks: { (): UReject }, progressCallbacks?: { (arg: TNotify): void } ): JQueryPromiseVR; // U Pipe then( doneCallbacks: { (): JQueryDeferredN }, failCallbacks?: { (): void }, progressCallbacks?: { (): void } ): JQueryPromiseN; then( doneCallbacks: { (): JQueryPromiseN }, failCallbacks?: { (): void }, progressCallbacks?: { (): void } ): JQueryPromiseN; // U Value then( doneCallbacks: { (): UValue }, failCallbacks?: { (): void }, progressCallbacks?: { (arg: TNotify): void } ): JQueryPromiseV; then( doneCallbacks: { (): void }, failCallbacks: { (): UReject }, progressCallbacks?: { (arg: TNotify): void } ): JQueryPromiseR; then( doneCallbacks: { (): void }, failCallbacks?: { (): void }, progressCallbacks?: { (arg: TNotify): void } ): JQueryPromise; } interface JQueryPromiseNNNN { always(...alwaysCallbacks: Array<{ (): void }>): JQueryPromiseNNNN; done(...doneCallbacks: Array<{ (): void }>): JQueryPromiseNNNN; fail(...failCallbacks: Array<{ (): void }>): JQueryPromiseNNNN; progress( ...progressCallbacks: Array<{ (arg1: TNotify1, arg2: TNotify2, arg3: TNotify3, arg4: TNotify4): void }> ): JQueryPromiseNNNN; state(): string; promise(target?: any): JQueryPromiseNNNN; then( doneCallbacks: { (): UValue }, failCallbacks: { (): UReject }, progressCallbacks?: { (arg1: TNotify1, arg2: TNotify2, arg3: TNotify3, arg4: TNotify4): void } ): JQueryPromiseVR; then( doneCallbacks: { (): UValue }, failCallbacks?: { (): void }, progressCallbacks?: { (arg1: TNotify1, arg2: TNotify2, arg3: TNotify3, arg4: TNotify4): void } ): JQueryPromiseV; then( doneCallbacks: { (): void }, failCallbacks: { (): UReject }, progressCallbacks?: { (arg1: TNotify1, arg2: TNotify2, arg3: TNotify3, arg4: TNotify4): void } ): JQueryPromiseR; then( doneCallbacks: { (): void }, failCallbacks?: { (): void }, progressCallbacks?: { (arg1: TNotify1, arg2: TNotify2, arg3: TNotify3, arg4: TNotify4): void } ): JQueryPromise; } interface JQueryPromiseVV { always(...alwaysCallbacks: Array<{ (): void }>): JQueryPromiseVV; done(...doneCallbacks: Array<{ (arg1: TValue1, arg2: TValue2): void }>): JQueryPromiseVV; fail(...failCallbacks: Array<{ (): void }>): JQueryPromiseVV; progress(...progressCallbacks: Array<{ (): void }>): JQueryPromiseVV; state(): string; promise(target?: any): JQueryPromiseVV; then( doneCallbacks: { (arg1: TValue1, arg2: TValue2): UValue }, failCallbacks: { (): UReject }, progressCallbacks?: { (): void } ): JQueryPromiseVR; // U Pipe then( doneCallbacks: { (arg1: TValue1, arg2: TValue2): JQueryDeferredVV }, failCallbacks?: { (): void }, progressCallbacks?: { (): void } ): JQueryPromiseVV; then( doneCallbacks: { (arg1: TValue1, arg2: TValue2): JQueryPromiseVV }, failCallbacks?: { (): void }, progressCallbacks?: { (): void } ): JQueryPromiseVV; // U Value then( doneCallbacks: { (arg1: TValue1, arg2: TValue2): UValue }, failCallbacks?: { (): void }, progressCallbacks?: { (): void } ): JQueryPromiseV; then( doneCallbacks: { (arg1: TValue1, arg2: TValue2): void }, failCallbacks: { (): UReject }, progressCallbacks?: { (): void } ): JQueryPromiseR; then( doneCallbacks: { (arg1: TValue1, arg2: TValue2): void }, failCallbacks?: { (): void }, progressCallbacks?: { (): void } ): JQueryPromise; } interface JQueryPromiseVVV { always(...alwaysCallbacks: Array<{ (): void }>): JQueryPromiseVVV; done( ...doneCallbacks: Array<{ (arg1: TValue1, arg2: TValue2, arg3: TValue3): void }> ): JQueryPromiseVVV; fail(...failCallbacks: Array<{ (): void }>): JQueryPromiseVVV; progress(...progressCallbacks: Array<{ (): void }>): JQueryPromiseVVV; state(): string; promise(target?: any): JQueryPromiseVVV; then( doneCallbacks: { (arg1: TValue1, arg2: TValue2, arg3: TValue3): UValue }, failCallbacks: { (): UReject }, progressCallbacks?: { (): void } ): JQueryPromiseVR; // U Pipe then( doneCallbacks: { (arg1: TValue1, arg2: TValue2, arg3: TValue3): JQueryDeferredVVV }, failCallbacks?: { (): void }, progressCallbacks?: { (): void } ): JQueryPromiseVVV; then( doneCallbacks: { (arg1: TValue1, arg2: TValue2, arg3: TValue3): JQueryPromiseVVV }, failCallbacks?: { (): void }, progressCallbacks?: { (): void } ): JQueryPromiseVVV; // U Value then( doneCallbacks: { (arg1: TValue1, arg2: TValue2, arg3: TValue3): UValue }, failCallbacks?: { (): void }, progressCallbacks?: { (): void } ): JQueryPromiseV; then( doneCallbacks: { (arg1: TValue1, arg2: TValue2, arg3: TValue3): void }, failCallbacks: { (): UReject }, progressCallbacks?: { (): void } ): JQueryPromiseR; then( doneCallbacks: { (arg1: TValue1, arg2: TValue2, arg3: TValue3): void }, failCallbacks?: { (): void }, progressCallbacks?: { (): void } ): JQueryPromise; } interface JQueryPromiseVR { always(...alwaysCallbacks: Array<{ (): void }>): JQueryPromiseVR; done(...doneCallbacks: Array<{ (arg: TValue): void }>): JQueryPromiseVR; fail(...failCallbacks: Array<{ (arg: TReject): void }>): JQueryPromiseVR; progress(...progressCallbacks: Array<{ (): void }>): JQueryPromiseVR; state(): string; promise(target?: any): JQueryPromiseVR; then( doneCallbacks: { (arg: TValue): JQueryPromiseVR }, failCallbacks?: { (arg: TReject): UReject }, progressCallbacks?: { (): void } ): JQueryPromiseVR; then( doneCallbacks: { (arg: TValue): UValue }, failCallbacks?: { (arg: TReject): UReject }, progressCallbacks?: { (): void } ): JQueryPromiseVR; // U Pipe then( doneCallbacks: { (arg: TValue): JQueryDeferredVR }, failCallbacks?: { (arg: TReject): void }, progressCallbacks?: { (): void } ): JQueryPromiseVR; then( doneCallbacks: { (arg: TValue): JQueryPromiseVR }, failCallbacks?: { (arg: TReject): void }, progressCallbacks?: { (): void } ): JQueryPromiseVR; // U Value then( doneCallbacks: { (arg: TValue): UValue }, failCallbacks?: { (arg: TReject): void }, progressCallbacks?: { (): void } ): JQueryPromiseV; then( doneCallbacks: { (arg: TValue): void }, failCallbacks?: { (arg: TReject): UReject }, progressCallbacks?: { (): void } ): JQueryPromiseR; then( doneCallbacks: { (arg: TValue): void }, failCallbacks?: { (arg: TReject): void }, progressCallbacks?: { (): void } ): JQueryPromise; } interface JQueryPromiseVRN { always(...alwaysCallbacks: Array<{ (): void }>): JQueryPromiseVRN; done(...doneCallbacks: Array<{ (arg: TValue): void }>): JQueryPromiseVRN; fail(...failCallbacks: Array<{ (arg: TReject): void }>): JQueryPromiseVRN; progress(...progressCallbacks: Array<{ (arg: TProgress): void }>): JQueryPromiseVRN; state(): string; promise(target?: any): JQueryPromiseVRN; then( doneCallbacks: { (arg: TValue): UValue }, failCallbacks: { (arg: TReject): UReject }, progressCallbacks?: { (arg: TProgress): void } ): JQueryPromiseVR; // U Pipe then( doneCallbacks: { (arg: TValue): JQueryDeferredVRN }, failCallbacks?: { (arg: TReject): void }, progressCallbacks?: { (): void } ): JQueryPromiseVRN; then( doneCallbacks: { (arg: TValue): JQueryPromiseVRN }, failCallbacks?: { (arg: TReject): void }, progressCallbacks?: { (): void } ): JQueryPromiseVRN; // U Value then( doneCallbacks: { (arg: TValue): UValue }, failCallbacks?: { (arg: TReject): void }, progressCallbacks?: { (arg: TProgress): void } ): JQueryPromiseV; then( doneCallbacks: { (arg: TValue): void }, failCallbacks: { (arg: TReject): UReject }, progressCallbacks?: { (arg: TProgress): void } ): JQueryPromiseR; then( doneCallbacks: { (arg: TValue): void }, failCallbacks?: { (arg: TReject): void }, progressCallbacks?: { (arg: TProgress): void } ): JQueryPromise; } interface JQueryPromiseR { always(...alwaysCallbacks: Array<{ (): void }>): JQueryPromiseR; done(...doneCallbacks: Array<{ (): void }>): JQueryPromiseR; fail(...failCallbacks: Array<{ (arg: TReject): void }>): JQueryPromiseR; progress(...progressCallbacks: Array<{ (): void }>): JQueryPromiseR; state(): string; promise(target?: any): JQueryPromiseR; then( doneCallbacks: { (): UValue }, failCallbacks: { (arg: TReject): UReject }, progressCallbacks?: { (): void } ): JQueryPromiseVR; // U Pipe then( doneCallbacks: { (): JQueryDeferredR }, failCallbacks?: { (arg: TReject): void }, progressCallbacks?: { (): void } ): JQueryPromiseR; then( doneCallbacks: { (): JQueryPromiseR }, failCallbacks?: { (arg: TReject): void }, progressCallbacks?: { (): void } ): JQueryPromiseR; then( doneCallbacks: { (): void }, failCallbacks?: { (arg: TReject): UReject }, progressCallbacks?: { (): void } ): JQueryPromiseR; then( doneCallbacks: { (): void }, failCallbacks: { (arg: TReject): void }, progressCallbacks?: { (): void } ): JQueryPromise; } /* Interface for the JQuery deferred, part of callbacks */ interface JQueryDeferredAny { always(...alwaysCallbacks: { (...args: any[]): void }[]): JQueryDeferredAny; done(...doneCallbacks: { (...args: any[]): void }[]): JQueryDeferredAny; fail(...failCallbacks: { (...args: any[]): void }[]): JQueryDeferredAny; progress(...progressCallbacks: { (): void }[]): JQueryDeferredAny; notify(...args: any[]): JQueryDeferredAny; notifyWith(context: any, args: any[]): JQueryDeferredAny; promise(target?: any): JQueryPromiseAny; reject(...args: any[]): JQueryDeferredAny; rejectWith(context: any, args: any[]): JQueryDeferredAny; resolve(...args: any[]): JQueryDeferredAny; resolveWith(context: any, args: any[]): JQueryDeferredAny; state(): string; then( doneCallbacks: { (...args: any[]): any }, failCallbacks: { (...args: any[]): any }, progressCallbacks?: { (...args: any[]): any } ): JQueryDeferredAny; } interface JQueryDeferred { notify(): JQueryDeferred; notifyWith(context: any): JQueryDeferred; always(...alwaysCallbacks: Array<{ (): void }>): JQueryDeferred; done(...doneCallbacks: Array<{ (): void }>): JQueryDeferred; fail(...failCallbacks: Array<{ (): void }>): JQueryDeferred; progress(...progressCallbacks: Array<{ (): void }>): JQueryDeferred; promise(target?: any): JQueryPromise; reject(...args: Array): JQueryDeferred; rejectWith(context: any): JQueryDeferred; resolve(): JQueryDeferred; resolveWith(context: any): JQueryDeferred; state(): string; then( doneCallbacks: { (): UValue }, failCallbacks: { (): UReject }, progressCallbacks?: { (): void } ): JQueryPromiseVR; // U Pipe then( doneCallbacks: { (): JQueryDeferred }, failCallbacks?: { (): void }, progressCallbacks?: { (): void } ): JQueryPromise; then( doneCallbacks: { (): JQueryPromise }, failCallbacks?: { (): void }, progressCallbacks?: { (): void } ): JQueryPromise; // U Value then( doneCallbacks: { (): UValue }, failCallbacks?: { (): void }, progressCallbacks?: { (): void } ): JQueryPromiseV; then( doneCallbacks: { (): void }, failCallbacks: { (): UReject }, progressCallbacks?: { (): void } ): JQueryPromiseR; then(doneCallbacks: { (): void }, failCallbacks?: { (): void }, progressCallbacks?: { (): void }): JQueryPromise; } interface JQueryDeferredV { notify(): JQueryDeferredV; notifyWith(context: any): JQueryDeferredV; always(...alwaysCallbacks: Array<{ (): void }>): JQueryDeferredV; done(...doneCallbacks: Array<{ (arg: TValue): void }>): JQueryDeferredV; fail(...failCallbacks: Array<{ (): void }>): JQueryDeferredV; progress(...progressCallbacks: Array<{ (): void }>): JQueryDeferredV; promise(target?: any): JQueryPromiseV; reject(...args: Array): JQueryDeferredV; rejectWith(context: any): JQueryDeferredV; resolve(arg: TValue): JQueryDeferredV; resolveWith(context: any, args: TValue[]): JQueryDeferredV; state(): string; then( doneCallbacks: { (arg: TValue): UValue }, failCallbacks: { (): UReject }, progressCallbacks?: { (): void } ): JQueryPromiseVR; // U Pipe then( doneCallbacks: { (arg: TValue): JQueryDeferredV }, failCallbacks?: { (): void }, progressCallbacks?: { (): void } ): JQueryPromiseV; then( doneCallbacks: { (arg: TValue): JQueryPromiseV }, failCallbacks?: { (): void }, progressCallbacks?: { (): void } ): JQueryPromiseV; // U Value then( doneCallbacks: { (arg: TValue): UValue }, failCallbacks?: { (): void }, progressCallbacks?: { (): void } ): JQueryPromiseV; then( doneCallbacks: { (arg: TValue): void }, failCallbacks: { (): UReject }, progressCallbacks?: { (): void } ): JQueryPromiseR; then( doneCallbacks: { (arg: TValue): void }, failCallbacks?: { (): void }, progressCallbacks?: { (): void } ): JQueryPromise; } interface JQueryDeferredN { notify(arg: TNotify): JQueryDeferredN; notifyWith(context: any, arg: TNotify): JQueryDeferredN; always(...alwaysCallbacks: Array<{ (): void }>): JQueryDeferredN; done(...doneCallbacks: Array<{ (): void }>): JQueryDeferredN; fail(...failCallbacks: Array<{ (): void }>): JQueryDeferredN; progress(...progressCallbacks: Array<{ (arg: TNotify): void }>): JQueryDeferredN; promise(target?: any): JQueryPromiseN; reject(...args: Array): JQueryDeferredN; rejectWith(context: any): JQueryDeferredN; resolve(): JQueryDeferredN; resolveWith(context: any): JQueryDeferredN; state(): string; then( doneCallbacks: { (): UValue }, failCallbacks: { (): UReject }, progressCallbacks?: { (arg: TNotify): void } ): JQueryPromiseVR; // U Pipe then( doneCallbacks: { (): JQueryDeferredN }, failCallbacks?: { (): void }, progressCallbacks?: { (): void } ): JQueryPromiseN; then( doneCallbacks: { (): JQueryPromiseN }, failCallbacks?: { (): void }, progressCallbacks?: { (): void } ): JQueryPromiseN; // U Value then( doneCallbacks: { (): UValue }, failCallbacks?: { (): void }, progressCallbacks?: { (arg: TNotify): void } ): JQueryPromiseV; then( doneCallbacks: { (): void }, failCallbacks: { (): UReject }, progressCallbacks?: { (arg: TNotify): void } ): JQueryPromiseR; then( doneCallbacks: { (): void }, failCallbacks?: { (): void }, progressCallbacks?: { (arg: TNotify): void } ): JQueryPromise; } interface JQueryDeferredNNNN { notify( arg1: TNotify1, arg2: TNotify2, arg3: TNotify3, arg4: TNotify4 ): JQueryDeferredNNNN; notifyWith( context: any, arg1: TNotify1, arg2: TNotify2, arg3: TNotify3, arg4: TNotify4 ): JQueryDeferredNNNN; always(...alwaysCallbacks: Array<{ (): void }>): JQueryDeferredNNNN; done(...doneCallbacks: Array<{ (): void }>): JQueryDeferredNNNN; fail(...failCallbacks: Array<{ (): void }>): JQueryDeferredNNNN; progress( ...progressCallbacks: Array<{ (arg1: TNotify1, arg2: TNotify2, arg3: TNotify3, arg4: TNotify4): void }> ): JQueryDeferredNNNN; promise(target?: any): JQueryPromiseNNNN; reject(...args: Array): JQueryDeferredNNNN; rejectWith(context: any): JQueryDeferredNNNN; resolve(): JQueryDeferredNNNN; resolveWith(context: any): JQueryDeferredNNNN; state(): string; then( doneCallbacks: { (): UValue }, failCallbacks: { (): UReject }, progressCallbacks?: { (arg1: TNotify1, arg2: TNotify2, arg3: TNotify3, arg4: TNotify4): void } ): JQueryPromiseVR; then( doneCallbacks: { (): UValue }, failCallbacks?: { (): void }, progressCallbacks?: { (arg1: TNotify1, arg2: TNotify2, arg3: TNotify3, arg4: TNotify4): void } ): JQueryPromiseV; then( doneCallbacks: { (): void }, failCallbacks: { (): UReject }, progressCallbacks?: { (arg1: TNotify1, arg2: TNotify2, arg3: TNotify3, arg4: TNotify4): void } ): JQueryPromiseR; then( doneCallbacks: { (): void }, failCallbacks?: { (): void }, progressCallbacks?: { (arg1: TNotify1, arg2: TNotify2, arg3: TNotify3, arg4: TNotify4): void } ): JQueryPromise; } interface JQueryDeferredVV { notify(): JQueryDeferredVV; notifyWith(context: any): JQueryDeferredVV; always(...alwaysCallbacks: Array<{ (): void }>): JQueryDeferredVV; done(...doneCallbacks: Array<{ (arg1: TValue1, arg2: TValue2): void }>): JQueryDeferredVV; fail(...failCallbacks: Array<{ (): void }>): JQueryDeferredVV; progress(...progressCallbacks: Array<{ (): void }>): JQueryDeferredVV; promise(target?: any): JQueryPromiseVV; reject(...args: Array): JQueryDeferredVV; rejectWith(context: any): JQueryDeferredVV; resolve(arg1: TValue1, arg2: TValue2): JQueryDeferredVV; resolveWith(context: any, args: any[]): JQueryDeferredVV; state(): string; then( doneCallbacks: { (arg1: TValue1, arg2: TValue2): UValue }, failCallbacks: { (): UReject }, progressCallbacks?: { (): void } ): JQueryPromiseVR; // U Pipe then( doneCallbacks: { (arg1: TValue1, arg2: TValue2): JQueryDeferredVV }, failCallbacks?: { (): void }, progressCallbacks?: { (): void } ): JQueryPromiseVV; then( doneCallbacks: { (arg1: TValue1, arg2: TValue2): JQueryPromiseVV }, failCallbacks?: { (): void }, progressCallbacks?: { (): void } ): JQueryPromiseVV; // U Value then( doneCallbacks: { (arg1: TValue1, arg2: TValue2): UValue }, failCallbacks?: { (): void }, progressCallbacks?: { (): void } ): JQueryPromiseV; then( doneCallbacks: { (arg1: TValue1, arg2: TValue2): void }, failCallbacks: { (): UReject }, progressCallbacks?: { (): void } ): JQueryPromiseR; then( doneCallbacks: { (arg1: TValue1, arg2: TValue2): void }, failCallbacks?: { (): void }, progressCallbacks?: { (): void } ): JQueryPromise; } interface JQueryDeferredVVV { notify(): JQueryDeferredVVV; notifyWith(context: any): JQueryDeferredVVV; always(...alwaysCallbacks: Array<{ (): void }>): JQueryDeferredVVV; done( ...doneCallbacks: Array<{ (arg1: TValue1, arg2: TValue2, arg3: TValue3): void }> ): JQueryDeferredVVV; fail(...failCallbacks: Array<{ (): void }>): JQueryDeferredVVV; progress(...progressCallbacks: Array<{ (): void }>): JQueryDeferredVVV; promise(target?: any): JQueryPromiseVVV; reject(...args: Array): JQueryDeferredVVV; rejectWith(context: any): JQueryDeferredVVV; resolve(arg1: TValue1, arg2: TValue2, arg3: TValue3): JQueryDeferredVVV; resolveWith(context: any, args: any[]): JQueryDeferredVVV; state(): string; then( doneCallbacks: { (arg1: TValue1, arg2: TValue2, arg3: TValue3): UValue }, failCallbacks?: { (): UReject }, progressCallbacks?: { (): void } ): JQueryPromiseVR; // U Pipe then( doneCallbacks: { (arg1: TValue1, arg2: TValue2, arg3: TValue3): JQueryDeferredVVV }, failCallbacks?: { (): void }, progressCallbacks?: { (): void } ): JQueryPromiseVVV; then( doneCallbacks: { (arg1: TValue1, arg2: TValue2, arg3: TValue3): JQueryPromiseVVV }, failCallbacks?: { (): void }, progressCallbacks?: { (): void } ): JQueryPromiseVVV; // U Value then( doneCallbacks: { (arg1: TValue1, arg2: TValue2, arg3: TValue3): UValue }, failCallbacks?: { (): void }, progressCallbacks?: { (): void } ): JQueryPromiseV; then( doneCallbacks: { (arg1: TValue1, arg2: TValue2, arg3: TValue3): void }, failCallbacks?: { (): UReject }, progressCallbacks?: { (): void } ): JQueryPromiseR; then( doneCallbacks: { (arg1: TValue1, arg2: TValue2, arg3: TValue3): void }, failCallbacks?: { (): void }, progressCallbacks?: { (): void } ): JQueryPromise; } interface JQueryDeferredVR { notify(): JQueryDeferredVR; notifyWith(context: any): JQueryDeferredVR; always(...alwaysCallbacks: Array<{ (): void }>): JQueryDeferredVR; done(...doneCallbacks: Array<{ (arg: TValue): void }>): JQueryDeferredVR; fail(...failCallbacks: Array<{ (arg: TReject): void }>): JQueryDeferredVR; progress(...progressCallbacks: Array<{ (): void }>): JQueryDeferredVR; promise(target?: any): JQueryPromiseVR; reject(arg: TReject): JQueryDeferredVR; rejectWith(context: any, arg: TReject[]): JQueryDeferredVR; resolve(arg: TValue): JQueryDeferredVR; resolveWith(context: any, args: TValue[]): JQueryDeferredVR; state(): string; then( doneCallbacks: { (arg: TValue): UValue }, failCallbacks: { (arg: TReject): UReject }, progressCallbacks?: { (): void } ): JQueryPromiseVR; // U Pipe then( doneCallbacks: { (arg: TValue): JQueryDeferredVR }, failCallbacks?: { (arg: TReject): void }, progressCallbacks?: { (): void } ): JQueryPromiseVR; then( doneCallbacks: { (arg: TValue): JQueryPromiseVR }, failCallbacks?: { (arg: TReject): void }, progressCallbacks?: { (): void } ): JQueryPromiseVR; // U Value then( doneCallbacks: { (arg: TValue): UValue }, failCallbacks?: { (arg: TReject): void }, progressCallbacks?: { (): void } ): JQueryPromiseV; then( doneCallbacks: { (arg: TValue): void }, failCallbacks: { (arg: TReject): UReject }, progressCallbacks?: { (): void } ): JQueryPromiseR; then( doneCallbacks: { (arg: TValue): void }, failCallbacks?: { (arg: TReject): void }, progressCallbacks?: { (): void } ): JQueryPromise; } interface JQueryDeferredVRN { notify(arg: TNotify): JQueryDeferredVR; notifyWith(context: any, arg: TNotify): JQueryDeferredVR; always(...alwaysCallbacks: Array<{ (): void }>): JQueryDeferredVR; done(...doneCallbacks: Array<{ (arg: TValue): void }>): JQueryDeferredVR; fail(...failCallbacks: Array<{ (arg: TReject): void }>): JQueryDeferredVR; progress(...progressCallbacks: Array<{ (arg: TNotify): void }>): JQueryDeferredVR; promise(target?: any): JQueryPromiseVRN; reject(arg: TReject): JQueryDeferredVR; rejectWith(context: any, args: TReject[]): JQueryDeferredVR; resolve(arg: TValue): JQueryDeferredVR; resolveWith(context: any, args: TValue[]): JQueryDeferredVR; state(): string; then( doneCallbacks: { (arg: TValue): UValue }, failCallbacks: { (arg: TReject): UReject }, progressCallbacks?: { (arg: TNotify): void } ): JQueryPromiseVR; // U Pipe then( doneCallbacks: { (arg: TValue): JQueryDeferredVRN }, failCallbacks?: { (arg: TReject): void }, progressCallbacks?: { (): void } ): JQueryPromiseVRN; then( doneCallbacks: { (arg: TValue): JQueryPromiseVRN }, failCallbacks?: { (arg: TReject): void }, progressCallbacks?: { (): void } ): JQueryPromiseVRN; // U Value then( doneCallbacks: { (arg: TValue): UValue }, failCallbacks?: { (arg: TReject): void }, progressCallbacks?: { (arg: TNotify): void } ): JQueryPromiseV; then( doneCallbacks: { (arg: TValue): void }, failCallbacks: { (arg: TReject): UReject }, progressCallbacks?: { (arg: TNotify): void } ): JQueryPromiseR; then( doneCallbacks: { (arg: TValue): void }, failCallbacks?: { (arg: TReject): void }, progressCallbacks?: { (arg: TNotify): void } ): JQueryPromise; } interface JQueryDeferredR { notify(): JQueryDeferredR; notifyWith(context: any): JQueryDeferredR; always(...alwaysCallbacks: Array<{ (): void }>): JQueryDeferredR; done(...doneCallbacks: Array<{ (): void }>): JQueryDeferredR; fail(...failCallbacks: Array<{ (arg: TReject): void }>): JQueryDeferredR; progress(...progressCallbacks: Array<{ (): void }>): JQueryDeferredR; promise(target?: any): JQueryPromiseR; reject(arg: TReject): JQueryDeferredR; rejectWith(context: any, args: TReject[]): JQueryDeferredR; resolve(): JQueryDeferredR; resolveWith(context: any): JQueryDeferredR; state(): string; then( doneCallbacks: { (): UValue }, failCallbacks: { (arg: TReject): UReject }, progressCallbacks?: { (): void } ): JQueryPromiseVR; // U Pipe then( doneCallbacks: { (): JQueryDeferredR }, failCallbacks?: { (arg: TReject): void }, progressCallbacks?: { (): void } ): JQueryPromiseR; then( doneCallbacks: { (): JQueryPromiseR }, failCallbacks?: { (arg: TReject): void }, progressCallbacks?: { (): void } ): JQueryPromiseR; then( doneCallbacks: { (): void }, failCallbacks: { (arg: TReject): UReject }, progressCallbacks?: { (): void } ): JQueryPromiseR; then( doneCallbacks: { (): void }, failCallbacks?: { (arg: TReject): void }, progressCallbacks?: { (): void } ): JQueryPromise; } /* Interface of the JQuery extension of the W3C event object */ interface BaseJQueryEventObject extends Event { data: any; delegateTarget: Element; isDefaultPrevented(): boolean; isImmediatePropagationStopped(): boolean; isPropagationStopped(): boolean; originalEvent: Event; namespace: string; preventDefault(): any; relatedTarget: Element; result: any; stopImmediatePropagation(): void; stopPropagation(): void; pageX: number; pageY: number; which: number; // Other possible values cancellable?: boolean; // detail ?? prevValue?: any; view?: Window; } interface JQueryInputEventObject extends BaseJQueryEventObject { altKey: boolean; ctrlKey: boolean; metaKey: boolean; shiftKey: boolean; } interface JQueryMouseEventObject extends JQueryInputEventObject { button: number; clientX: number; clientY: number; offsetX: number; offsetY: number; pageX: number; pageY: number; screenX: number; screenY: number; } interface JQueryKeyEventObject extends JQueryInputEventObject { char: any; charCode: number; key: any; keyCode: number; } interface JQueryEventObject extends BaseJQueryEventObject, JQueryInputEventObject, JQueryMouseEventObject, JQueryKeyEventObject {} interface JQueryEventHandler { (eventObject: JQueryEventObject, args?: any): any; } interface JQuerySupport { ajax?: boolean; boxModel?: boolean; changeBubbles?: boolean; checkClone?: boolean; checkOn?: boolean; cors?: boolean; cssFloat?: boolean; hrefNormalized?: boolean; htmlSerialize?: boolean; leadingWhitespace?: boolean; noCloneChecked?: boolean; noCloneEvent?: boolean; opacity?: boolean; optDisabled?: boolean; optSelected?: boolean; scriptEval?(): boolean; style?: boolean; submitBubbles?: boolean; tbody?: boolean; } // TODO jsgoupil fix signature interface JQueryEventStatic { fix(evt: any): any; } interface JQueryParam { (obj: any): string; (obj: any, traditional: boolean): string; } /** * This is a private type. It exists for type checking. Do not explicitly declare an identifier with this type. */ interface _JQueryDeferred { resolve: Function; resolveWith: Function; reject: Function; rejectWith: Function; } interface JQueryWhen { (promise1: JQueryPromiseV, promise2: JQueryPromiseV): JQueryPromiseVV; ( promise1: JQueryPromiseV, promise2: JQueryPromiseV, promise3: JQueryPromiseV ): JQueryPromiseVVV; (...deferreds: JQueryPromise[]): JQueryPromise; apply($: JQueryStatic, deferreds: JQueryPromise[]): JQueryPromise; } /* Static members of jQuery (those on $ and jQuery themselves) */ interface JQueryStatic { /**** AJAX *****/ ajax(settings: JQueryAjaxSettings): JQueryXHR; ajax(url: string, settings?: JQueryAjaxSettings): JQueryXHR; ajaxPrefilter(dataTypes: string, handler: (opts: any, originalOpts: any, jqXHR: JQueryXHR) => any): any; ajaxPrefilter(handler: (opts: any, originalOpts: any, jqXHR: JQueryXHR) => any): any; ajaxSettings: JQueryAjaxSettings; ajaxSetup(options: JQueryAjaxSettings): void; ajaxTransport( dataType: string, handler: ( options: JQueryAjaxSettings, originalOptions: JQueryAjaxSettings, jqXHR: JQueryXHR ) => JQueryTransport ): any; get(url: string, data?: any, success?: any, dataType?: any): JQueryXHR; getJSON(url: string, data?: any, success?: any): JQueryXHR; getScript(url: string, success?: any): JQueryXHR; param: JQueryParam; post(url: string, data?: any, success?: any, dataType?: any): JQueryXHR; /********* CALLBACKS **********/ Callbacks(flags?: string): JQueryCallback; Callbacks(flags?: string): JQueryCallback1; Callbacks(flags?: string): JQueryCallback2; Callbacks(flags?: string): JQueryCallback3; Callbacks(flags?: string): JQueryCallback4; /**** CORE *****/ holdReady(hold: boolean): any; (selector: string, context?: any): JQuery; (element: Element): JQuery; (object: {}): JQuery; (elementArray: Element[]): JQuery; (object: JQuery): JQuery; (func: Function): JQuery; (array: any[]): JQuery; (): JQuery; noConflict(removeAll?: boolean): Object; when: JQueryWhen; /*** CSS ****/ css(e: any, propertyName: string, value?: any): JQuery; css(e: any, propertyName: any, value?: any): JQuery; cssHooks: { [key: string]: any }; cssNumber: any; /**** DATA *****/ data(element: Document, key?: string, value?: any): any; data(element: Element, key: string, value: any): any; data(element: Element, key: string): any; data(element: Element): any; dequeue(element: Element, queueName?: string): any; hasData(element: Element): boolean; queue(element: Element, queueName?: string): any[]; queue(element: Element, queueName: string, newQueueOrCallback: any): JQuery; removeData(element: Document, name?: string): JQuery; removeData(element: Element, name?: string): JQuery; /******* EFFECTS ********/ fx: { tick: () => void; interval: number; stop: () => void; speeds: { slow: number; fast: number }; off: boolean; step: any; }; /****** EVENTS *******/ proxy(fn: (...args: any[]) => any, context: any, ...args: any[]): any; proxy(context: any, name: string, ...args: any[]): any; Deferred: { (fn?: (d: JQueryDeferred) => void): JQueryDeferred; new (fn?: (d: JQueryDeferred) => void): JQueryDeferred; // Can't use a constraint against JQueryDeferred because the non-generic JQueryDeferred.resolve is not a base type of // the generic JQueryDeferred.resolve methods. (fn?: (d: TDeferred) => void): TDeferred; new (fn?: (d: TDeferred) => void): TDeferred; }; Event(name: string, eventProperties?: any): JQueryEventObject; Event(evt: JQueryEventObject, eventProperties?: any): JQueryEventObject; event: JQueryEventStatic; /********* INTERNALS **********/ error(message: any): JQuery; /************* MISCELLANEOUS **************/ expr: any; fn: JQuery; isReady: boolean; /********** PROPERTIES ***********/ support: JQuerySupport; /********* UTILITIES **********/ contains(container: Element, contained: Element): boolean; each(collection: any, callback: (indexInArray: any, valueOfElement: any) => any): any; each(collection: JQuery, callback: (indexInArray: number, valueOfElement: HTMLElement) => any): JQuery; each(collection: T[], callback: (indexInArray: number, valueOfElement: T) => void): T[]; extend(deep: boolean, target: any, ...objs: any[]): any; extend(target: any, ...objs: any[]): any; globalEval(code: string): any; grep(array: T[], func: (elementOfArray: T, indexInArray: number) => boolean, invert?: boolean): T[]; inArray(value: T, array: T[], fromIndex?: number): number; isArray(obj: any): boolean; isEmptyObject(obj: any): boolean; isFunction(obj: any): boolean; isNumeric(value: any): boolean; isPlainObject(obj: any): boolean; isWindow(obj: any): boolean; isXMLDoc(node: Node): boolean; makeArray(obj: any): any[]; map(array: T[], callback: (elementOfArray: T, indexInArray: number) => U): U[]; map(object: { [item: string]: T }, callback: (elementOfArray: T, indexInArray: string) => U): U[]; map(array: any, callback: (elementOfArray: any, indexInArray: any) => any): any; merge(first: T[], second: T[]): T[]; noop(): any; now(): number; parseHTML(data: string, context?: Element, keepScripts?: boolean): Element[]; parseJSON(json: string): Object; //FIXME: This should return an XMLDocument parseXML(data: string): any; trim(str: string): string; type(obj: any): string; unique(arr: T[]): T[]; } interface JQueryTransport { send( headers: { [index: string]: string }, completeCallback: ( status: number, statusText: string, responses?: { [dataType: string]: any }, headers?: string ) => any ): any; abort(): any; } /* The jQuery instance members */ interface JQuery { /**** AJAX *****/ ajaxComplete(handler: any): JQuery; ajaxError(handler: (event: any, jqXHR: any, settings: any, exception: any) => any): JQuery; ajaxSend(handler: (event: any, jqXHR: any, settings: any, exception: any) => any): JQuery; ajaxStart(handler: () => any): JQuery; ajaxStop(handler: () => any): JQuery; ajaxSuccess(handler: (event: any, jqXHR: any, settings: any, exception: any) => any): JQuery; load(url: string, data?: any, complete?: any): JQuery; serialize(): string; serializeArray(): any[]; /********** ATTRIBUTES ***********/ addClass(classNames: string): JQuery; addClass(func: (index: any, currentClass: any) => string): JQuery; // http://api.jquery.com/addBack/ addBack(selector?: string): JQuery; attr(attributeName: string): string; attr(attributeName: string, value: any): JQuery; attr(map: { [key: string]: any }): JQuery; attr(attributeName: string, func: (index: any, attr: any) => any): JQuery; hasClass(className: string): boolean; html(): string; html(htmlString: number): JQuery; html(htmlString: string): JQuery; html(htmlContent: (index: number, oldhtml: string) => string): JQuery; prop(propertyName: string): any; prop(propertyName: string, value: any): JQuery; prop(map: any): JQuery; prop(propertyName: string, func: (index: any, oldPropertyValue: any) => any): JQuery; removeAttr(attributeName: any): JQuery; removeClass(className?: any): JQuery; removeClass(func: (index: any, cls: any) => any): JQuery; removeProp(propertyName: any): JQuery; toggleClass(className: any, swtch?: boolean): JQuery; toggleClass(swtch?: boolean): JQuery; toggleClass(func: (index: any, cls: any, swtch: any) => any): JQuery; val(): any; val(value: string[]): JQuery; val(value: string): JQuery; val(value: number): JQuery; val(func: (index: any, value: any) => any): JQuery; /*** CSS ****/ css(propertyName: string): string; css(propertyNames: string[]): string; css(properties: any): JQuery; css(propertyName: string, value: any): JQuery; css(propertyName: any, value: any): JQuery; height(): number; height(value: number): JQuery; height(value: string): JQuery; height(func: (index: any, height: any) => any): JQuery; innerHeight(): number; innerWidth(): number; offset(): { left: number; top: number }; offset(coordinates: any): JQuery; offset(func: (index: any, coords: any) => any): JQuery; outerHeight(includeMargin?: boolean): number; outerWidth(includeMargin?: boolean): number; position(): { top: number; left: number }; scrollLeft(): number; scrollLeft(value: number): JQuery; scrollTop(): number; scrollTop(value: number): JQuery; width(): number; width(value: number): JQuery; width(value: string): JQuery; width(func: (index: any, height: any) => any): JQuery; /**** DATA *****/ clearQueue(queueName?: string): JQuery; data(key: string, value: any): JQuery; data(obj: { [key: string]: any }): JQuery; data(key?: string): any; dequeue(queueName?: string): JQuery; removeData(nameOrList?: any): JQuery; /******** DEFERRED *********/ promise(type?: any, target?: any): JQueryPromise; /******* EFFECTS ********/ animate(properties: any, duration?: any, complete?: Function): JQuery; animate(properties: any, duration?: any, easing?: string, complete?: Function): JQuery; animate( properties: any, options: { duration?: any; easing?: string; complete?: Function; step?: Function; queue?: boolean; specialEasing?: any; } ): JQuery; delay(duration: number, queueName?: string): JQuery; fadeIn(duration?: any, callback?: any): JQuery; fadeIn(duration?: any, easing?: string, callback?: any): JQuery; fadeOut(duration?: any, callback?: any): JQuery; fadeOut(duration?: any, easing?: string, callback?: any): JQuery; fadeTo(duration: any, opacity: number, callback?: any): JQuery; fadeTo(duration: any, opacity: number, easing?: string, callback?: any): JQuery; fadeToggle(duration?: any, callback?: any): JQuery; fadeToggle(duration?: any, easing?: string, callback?: any): JQuery; finish(): JQuery; hide(duration?: any, callback?: any): JQuery; hide(duration?: any, easing?: string, callback?: any): JQuery; show(duration?: any, callback?: any): JQuery; show(duration?: any, easing?: string, callback?: any): JQuery; slideDown(duration?: any, callback?: any): JQuery; slideDown(duration?: any, easing?: string, callback?: any): JQuery; slideToggle(duration?: any, callback?: any): JQuery; slideToggle(duration?: any, easing?: string, callback?: any): JQuery; slideUp(duration?: any, callback?: any): JQuery; slideUp(duration?: any, easing?: string, callback?: any): JQuery; stop(clearQueue?: boolean, jumpToEnd?: boolean): JQuery; stop(queue?: any, clearQueue?: boolean, jumpToEnd?: boolean): JQuery; toggle(duration?: any, callback?: any): JQuery; toggle(duration?: any, easing?: string, callback?: any): JQuery; toggle(showOrHide: boolean): JQuery; /****** EVENTS *******/ bind(eventType: string, eventData?: any, handler?: (eventObject: JQueryEventObject) => any): JQuery; bind(eventType: string, eventData: any, preventBubble: boolean): JQuery; bind(eventType: string, preventBubble: boolean): JQuery; bind(...events: any[]): JQuery; blur(eventData?: any, handler?: (eventObject: JQueryEventObject) => any): JQuery; blur(handler: (eventObject: JQueryEventObject) => any): JQuery; change(eventData?: any, handler?: (eventObject: JQueryEventObject) => any): JQuery; change(handler: (eventObject: JQueryEventObject) => any): JQuery; click(eventData?: any, handler?: (eventObject: JQueryEventObject) => any): JQuery; click(handler: (eventObject: JQueryEventObject) => any): JQuery; dblclick(eventData?: any, handler?: (eventObject: JQueryEventObject) => any): JQuery; dblclick(handler: (eventObject: JQueryEventObject) => any): JQuery; delegate(selector: any, eventType: string, handler: (eventObject: JQueryEventObject) => any): JQuery; focus(eventData?: any, handler?: (eventObject: JQueryEventObject) => any): JQuery; focus(handler: (eventObject: JQueryEventObject) => any): JQuery; focusin(eventData: any, handler: (eventObject: JQueryEventObject) => any): JQuery; focusin(handler: (eventObject: JQueryEventObject) => any): JQuery; focusout(eventData: any, handler: (eventObject: JQueryEventObject) => any): JQuery; focusout(handler: (eventObject: JQueryEventObject) => any): JQuery; hover( handlerIn: (eventObject: JQueryEventObject) => any, handlerOut: (eventObject: JQueryEventObject) => any ): JQuery; hover(handlerInOut: (eventObject: JQueryEventObject) => any): JQuery; keydown(eventData?: any, handler?: (eventObject: JQueryKeyEventObject) => any): JQuery; keydown(handler: (eventObject: JQueryKeyEventObject) => any): JQuery; keypress(eventData?: any, handler?: (eventObject: JQueryKeyEventObject) => any): JQuery; keypress(handler: (eventObject: JQueryKeyEventObject) => any): JQuery; keyup(eventData?: any, handler?: (eventObject: JQueryKeyEventObject) => any): JQuery; keyup(handler: (eventObject: JQueryKeyEventObject) => any): JQuery; load(eventData?: any, handler?: (eventObject: JQueryEventObject) => any): JQuery; load(handler: (eventObject: JQueryEventObject) => any): JQuery; mousedown(): JQuery; mousedown(eventData: any, handler: (eventObject: JQueryMouseEventObject) => any): JQuery; mousedown(handler: (eventObject: JQueryMouseEventObject) => any): JQuery; mouseevent(eventData: any, handler: (eventObject: JQueryMouseEventObject) => any): JQuery; mouseevent(handler: (eventObject: JQueryMouseEventObject) => any): JQuery; mouseenter(): JQuery; mouseenter(eventData: any, handler: (eventObject: JQueryMouseEventObject) => any): JQuery; mouseenter(handler: (eventObject: JQueryMouseEventObject) => any): JQuery; mouseleave(): JQuery; mouseleave(eventData: any, handler: (eventObject: JQueryMouseEventObject) => any): JQuery; mouseleave(handler: (eventObject: JQueryMouseEventObject) => any): JQuery; mousemove(): JQuery; mousemove(eventData: any, handler: (eventObject: JQueryMouseEventObject) => any): JQuery; mousemove(handler: (eventObject: JQueryMouseEventObject) => any): JQuery; mouseout(): JQuery; mouseout(eventData: any, handler: (eventObject: JQueryMouseEventObject) => any): JQuery; mouseout(handler: (eventObject: JQueryMouseEventObject) => any): JQuery; mouseover(): JQuery; mouseover(eventData: any, handler: (eventObject: JQueryMouseEventObject) => any): JQuery; mouseover(handler: (eventObject: JQueryMouseEventObject) => any): JQuery; mouseup(): JQuery; mouseup(eventData: any, handler: (eventObject: JQueryMouseEventObject) => any): JQuery; mouseup(handler: (eventObject: JQueryMouseEventObject) => any): JQuery; off(events?: string, selector?: any, handler?: (eventObject: JQueryEventObject) => any): JQuery; off(eventsMap: { [key: string]: any }, selector?: any): JQuery; on(events: string, selector: any, data: any, handler: (eventObject: JQueryEventObject, args: any) => any): JQuery; on(events: string, selector: any, handler: (eventObject: JQueryEventObject) => any): JQuery; on(events: string, handler: (eventObject: JQueryEventObject, args: any) => any): JQuery; on(eventsMap: { [key: string]: any }, selector?: any, data?: any): JQuery; one(events: string, selector?: any, data?: any, handler?: (eventObject: JQueryEventObject) => any): JQuery; one(eventsMap: { [key: string]: any }, selector?: any, data?: any): JQuery; ready(handler: any): JQuery; resize(eventData?: any, handler?: (eventObject: JQueryEventObject) => any): JQuery; resize(handler: (eventObject: JQueryEventObject) => any): JQuery; scroll(eventData?: any, handler?: (eventObject: JQueryEventObject) => any): JQuery; scroll(handler: (eventObject: JQueryEventObject) => any): JQuery; select(eventData?: any, handler?: (eventObject: JQueryEventObject) => any): JQuery; select(handler: (eventObject: JQueryEventObject) => any): JQuery; submit(eventData?: any, handler?: (eventObject: JQueryEventObject) => any): JQuery; submit(handler: (eventObject: JQueryEventObject) => any): JQuery; trigger(eventType: string, ...extraParameters: any[]): JQuery; trigger(event: JQueryEventObject, ...extraParameters: any[]): JQuery; triggerHandler(eventType: string, ...extraParameters: any[]): Object; // JSGOUPIL: triggerHandler uses trigger, not documented though triggerHandler(evt: JQueryEventObject): Object; unbind(eventType?: string, handler?: (eventObject: JQueryEventObject) => any): JQuery; unbind(eventType: string, fls: boolean): JQuery; unbind(evt: any): JQuery; undelegate(): JQuery; undelegate(selector: any, eventType: string, handler?: (eventObject: JQueryEventObject) => any): JQuery; undelegate(selector: any, events: any): JQuery; undelegate(namespace: string): JQuery; unload(eventData?: any, handler?: (eventObject: JQueryEventObject) => any): JQuery; unload(handler: (eventObject: JQueryEventObject) => any): JQuery; /********* INTERNALS **********/ context: Element; jquery: string; error(handler: (eventObject: JQueryEventObject) => any): JQuery; error(eventData: any, handler: (eventObject: JQueryEventObject) => any): JQuery; pushStack(elements: any[]): JQuery; pushStack(elements: any[], name: any, arguments: any): JQuery; /************ MANIPULATION *************/ after(...content: any[]): JQuery; after(func: (index: any) => any): JQuery; append(...content: any[]): JQuery; append(func: (index: any, html: any) => any): JQuery; appendTo(target: any): JQuery; before(...content: any[]): JQuery; before(func: (index: any) => any): JQuery; clone(withDataAndEvents?: boolean, deepWithDataAndEvents?: boolean): JQuery; detach(selector?: any): JQuery; empty(): JQuery; insertAfter(target: any): JQuery; insertBefore(target: any): JQuery; prepend(...content: any[]): JQuery; prepend(func: (index: any, html: any) => any): JQuery; prependTo(target: any): JQuery; remove(selector?: any): JQuery; replaceAll(target: any): JQuery; replaceWith(func: any): JQuery; text(): string; text(textString: any): JQuery; text(textString: (index: number, text: string) => string): JQuery; toArray(): any[]; unwrap(): JQuery; wrap(wrappingElement: any): JQuery; wrap(func: (index: any) => any): JQuery; wrapAll(wrappingElement: any): JQuery; wrapInner(wrappingElement: any): JQuery; wrapInner(func: (index: any) => any): JQuery; /************* MISCELLANEOUS **************/ each(func: (index: any, elem: Element) => any): JQuery; get(index?: number): any; index(): number; index(selector: string): number; index(element: any): number; /********** PROPERTIES ***********/ length: number; selector: string; [x: string]: any; [x: number]: HTMLElement; /********** TRAVERSING ***********/ add(selector: string, context?: any): JQuery; add(...elements: any[]): JQuery; add(html: string): JQuery; add(obj: JQuery): JQuery; children(selector?: any): JQuery; closest(selector: string): JQuery; closest(selector: string, context?: Element): JQuery; closest(obj: JQuery): JQuery; closest(element: any): JQuery; closest(selectors: any, context?: Element): any[]; contents(): JQuery; end(): JQuery; eq(index: number): JQuery; filter(selector: string): JQuery; filter(func: (index: any) => any): JQuery; filter(element: any): JQuery; filter(obj: JQuery): JQuery; find(selector: string): JQuery; find(element: any): JQuery; find(obj: JQuery): JQuery; first(): JQuery; has(selector: string): JQuery; has(contained: Element): JQuery; is(selector: string): boolean; is(func: (index: any) => any): boolean; is(element: any): boolean; is(obj: JQuery): boolean; last(): JQuery; map(callback: (index: any, domElement: Element) => any): JQuery; next(selector?: string): JQuery; nextAll(selector?: string): JQuery; nextUntil(selector?: string, filter?: string): JQuery; nextUntil(element?: Element, filter?: string): JQuery; not(selector: string): JQuery; not(func: (index: any) => any): JQuery; not(element: any): JQuery; not(obj: JQuery): JQuery; offsetParent(): JQuery; parent(selector?: string): JQuery; parents(selector?: string): JQuery; parentsUntil(selector?: string, filter?: string): JQuery; parentsUntil(element?: Element, filter?: string): JQuery; prev(selector?: string): JQuery; prevAll(selector?: string): JQuery; prevUntil(selector?: string, filter?: string): JQuery; prevUntil(element?: Element, filter?: string): JQuery; siblings(selector?: string): JQuery; slice(start: number, end?: number): JQuery; /********* UTILITIES **********/ queue(queueName?: string): any[]; queue(queueName: string, newQueueOrCallback: any): JQuery; queue(newQueueOrCallback: any): JQuery; } interface EventTarget { //nodeName: string; //bugfix, duplicate identifier. see: http://stackoverflow.com/questions/14824143/duplicate-identifier-nodename-in-jquery-d-ts } // TODO Rmove these and make jquery a proper module declare module "jquery"; declare var jQuery: JQueryStatic; declare var $: JQueryStatic;