diff --git a/types/jquery-awesome-cursor/tsconfig.json b/types/jquery-awesome-cursor/tsconfig.json index cb81088d83..7fb68010e3 100644 --- a/types/jquery-awesome-cursor/tsconfig.json +++ b/types/jquery-awesome-cursor/tsconfig.json @@ -2,7 +2,8 @@ "compilerOptions": { "module": "commonjs", "lib": [ - "es6" + "es6", + "dom" ], "noImplicitAny": true, "noImplicitThis": true, diff --git a/types/jquery-toast-plugin/tsconfig.json b/types/jquery-toast-plugin/tsconfig.json index 95759d345b..81dae6d531 100644 --- a/types/jquery-toast-plugin/tsconfig.json +++ b/types/jquery-toast-plugin/tsconfig.json @@ -2,7 +2,8 @@ "compilerOptions": { "module": "commonjs", "lib": [ - "es6" + "es6", + "dom" ], "noImplicitAny": true, "noImplicitThis": true, diff --git a/types/jquery.growl/tsconfig.json b/types/jquery.growl/tsconfig.json index 8416f143a7..7b2e28e9d9 100644 --- a/types/jquery.growl/tsconfig.json +++ b/types/jquery.growl/tsconfig.json @@ -2,7 +2,8 @@ "compilerOptions": { "module": "commonjs", "lib": [ - "es6" + "es6", + "dom" ], "noImplicitAny": true, "noImplicitThis": true, diff --git a/types/jquery/index.d.ts b/types/jquery/index.d.ts index 3b06f50ceb..344194e5af 100644 --- a/types/jquery/index.d.ts +++ b/types/jquery/index.d.ts @@ -21610,7 +21610,8 @@ $( "div" ).one( "click", function() { ``` */ - outerHeight(value: string | number | ((this: TElement, index: number, height: number) => string | number)): this; + outerHeight(value: string | number | ((this: TElement, index: number, height: number) => string | number), + includeMargin?: boolean): this; /** * Get the current computed outer height (including padding, border, and optionally margin) for the * first element in the set of matched elements. @@ -21703,7 +21704,8 @@ $( "div" ).one( "click", function() { ``` */ - outerWidth(value: string | number | ((this: TElement, index: number, width: number) => string | number)): this; + outerWidth(value: string | number | ((this: TElement, index: number, width: number) => string | number), + includeMargin?: boolean): this; /** * Get the current computed outer width (including padding, border, and optionally margin) for the * first element in the set of matched elements. diff --git a/types/jquery/jquery-tests.ts b/types/jquery/jquery-tests.ts index 37ddc27c56..31518d8d84 100644 --- a/types/jquery/jquery-tests.ts +++ b/types/jquery/jquery-tests.ts @@ -2616,12 +2616,27 @@ function JQuery() { } function outerHeight() { + // $ExpectType JQuery + $('p').outerHeight({} as string | number, true); + // $ExpectType JQuery $('p').outerHeight('200px'); // $ExpectType JQuery $('p').outerHeight(400); + // $ExpectType JQuery + $('p').outerHeight(function(index, height) { + // $ExpectType HTMLElement + this; + // $ExpectType number + index; + // $ExpectType number + height; + + return '200px'; + }, false); + // $ExpectType JQuery $('p').outerHeight(function(index, height) { // $ExpectType HTMLElement @@ -2724,12 +2739,27 @@ function JQuery() { } function outerWidth() { + // $ExpectType JQuery + $('p').outerWidth({} as string | number, true); + // $ExpectType JQuery $('p').outerWidth('200px'); // $ExpectType JQuery $('p').outerWidth(400); + // $ExpectType JQuery + $('p').outerWidth(function(index, width) { + // $ExpectType HTMLElement + this; + // $ExpectType number + index; + // $ExpectType number + width; + + return '200px'; + }, false); + // $ExpectType JQuery $('p').outerWidth(function(index, width) { // $ExpectType HTMLElement diff --git a/types/materialize-css/carousel.d.ts b/types/materialize-css/carousel.d.ts index fd660694d1..6c762ec830 100644 --- a/types/materialize-css/carousel.d.ts +++ b/types/materialize-css/carousel.d.ts @@ -110,8 +110,6 @@ declare namespace M { interface JQuery { carousel(method: keyof Pick): JQuery; - carousel(method: keyof Pick, n?: number): JQuery; - carousel(method: keyof Pick, n?: number): JQuery; - carousel(method: keyof Pick, n?: number): JQuery; + carousel(method: keyof Pick | keyof Pick | keyof Pick, n?: number): JQuery; carousel(options?: Partial): JQuery; } diff --git a/types/materialize-css/character-counter.d.ts b/types/materialize-css/character-counter.d.ts index 4d34ac170e..7634075a9b 100644 --- a/types/materialize-css/character-counter.d.ts +++ b/types/materialize-css/character-counter.d.ts @@ -20,6 +20,5 @@ declare namespace M { } interface JQuery { - characterCounter(method: keyof Pick): JQuery; - characterCounter(): JQuery; + characterCounter(method?: keyof Pick): JQuery; } diff --git a/types/materialize-css/collapsible.d.ts b/types/materialize-css/collapsible.d.ts index 649a59e9bb..d69e958730 100644 --- a/types/materialize-css/collapsible.d.ts +++ b/types/materialize-css/collapsible.d.ts @@ -77,7 +77,6 @@ declare namespace M { interface JQuery { collapsible(method: keyof Pick): JQuery; - collapsible(method: keyof Pick, n: number): JQuery; - collapsible(method: keyof Pick, n: number): JQuery; + collapsible(method: keyof Pick | keyof Pick, n: number): JQuery; collapsible(options?: Partial): JQuery; } diff --git a/types/materialize-css/range.d.ts b/types/materialize-css/range.d.ts index dac7a7edf2..a1de53baa9 100644 --- a/types/materialize-css/range.d.ts +++ b/types/materialize-css/range.d.ts @@ -20,6 +20,5 @@ declare namespace M { } interface JQuery { - range(): JQuery; - range(method: keyof Pick): JQuery; + range(method?: keyof Pick): JQuery; } diff --git a/types/ng-cordova/file.d.ts b/types/ng-cordova/file.d.ts index 8ebe777c14..c6c71972b4 100644 --- a/types/ng-cordova/file.d.ts +++ b/types/ng-cordova/file.d.ts @@ -36,7 +36,10 @@ declare namespace ngCordova { } export interface IFilePromise extends ng.IPromise { - then(successCallback: (promiseValue: T) => ng.IPromise | TResult, errorCallback?: (error: IFileError) => ng.IPromise | TResult): ng.IPromise; + then( + successCallback: (promiseValue: T) => ng.IPromise | TResult, + errorCallback?: (error: IFileError) => ng.IPromise | TResult2 + ): ng.IPromise; catch(onRejected: (error: IFileError) => ng.IPromise | TResult): ng.IPromise; } diff --git a/types/ng-cordova/fileTransfer.d.ts b/types/ng-cordova/fileTransfer.d.ts index e4ef359c14..9c1d8bf3c2 100644 --- a/types/ng-cordova/fileTransfer.d.ts +++ b/types/ng-cordova/fileTransfer.d.ts @@ -14,7 +14,11 @@ declare namespace ngCordova { } export interface IFileTransferPromise extends ng.IPromise { - then(successCallback: (promiseValue: T) => ng.IPromise | TResult, errorCallback?: (error: FileTransferError) => ng.IPromise | TResult, notifyCallback?: (state: any) => any): ng.IPromise; + then( + successCallback: (promiseValue: T) => ng.IPromise | TResult, + errorCallback?: (error: FileTransferError) => ng.IPromise | TResult2, + notifyCallback?: (state: any) => any + ): ng.IPromise; catch(onRejected: (error: FileTransferError) => ng.IPromise | TResult): ng.IPromise; } diff --git a/types/ng-tags-input/tsconfig.json b/types/ng-tags-input/tsconfig.json index 42a59350cb..09cfc54e25 100644 --- a/types/ng-tags-input/tsconfig.json +++ b/types/ng-tags-input/tsconfig.json @@ -2,7 +2,8 @@ "compilerOptions": { "module": "commonjs", "lib": [ - "es6" + "es6", + "dom" ], "noImplicitAny": true, "noImplicitThis": true, diff --git a/types/p-loading/tsconfig.json b/types/p-loading/tsconfig.json index 09fd52fdda..6f45b638aa 100644 --- a/types/p-loading/tsconfig.json +++ b/types/p-loading/tsconfig.json @@ -2,7 +2,8 @@ "compilerOptions": { "module": "commonjs", "lib": [ - "es6" + "es6", + "dom" ], "noImplicitAny": true, "noImplicitThis": true, diff --git a/types/summernote/tsconfig.json b/types/summernote/tsconfig.json index 127f97e02f..cfa86cb32d 100644 --- a/types/summernote/tsconfig.json +++ b/types/summernote/tsconfig.json @@ -2,7 +2,8 @@ "compilerOptions": { "module": "commonjs", "lib": [ - "es6" + "es6", + "dom" ], "noImplicitAny": true, "noImplicitThis": true, diff --git a/types/swig-email-templates/tsconfig.json b/types/swig-email-templates/tsconfig.json index b25f125136..67d0c3ccdf 100644 --- a/types/swig-email-templates/tsconfig.json +++ b/types/swig-email-templates/tsconfig.json @@ -2,7 +2,8 @@ "compilerOptions": { "module": "commonjs", "lib": [ - "es6" + "es6", + "dom" ], "noImplicitAny": true, "noImplicitThis": true,