From efc67e63d92187669026441e7c43c68a1f2ea795 Mon Sep 17 00:00:00 2001 From: Leonard Thieu Date: Mon, 26 Jun 2017 17:36:16 -0400 Subject: [PATCH 1/3] [angular][jquery] Fix merge issue with cssPropertySetter. --- types/angular/index.d.ts | 5 ++++- types/angular/jqlite.d.ts | 4 +++- types/jquery/v1/index.d.ts | 4 +++- types/jquery/v2/index.d.ts | 4 +++- 4 files changed, 13 insertions(+), 4 deletions(-) diff --git a/types/angular/index.d.ts b/types/angular/index.d.ts index 4f8d55f9dc..3683c1aed6 100644 --- a/types/angular/index.d.ts +++ b/types/angular/index.d.ts @@ -1,6 +1,9 @@ // Type definitions for Angular JS 1.6 // Project: http://angularjs.org -// Definitions by: Diego Vilar , Georgii Dolzhykov , Caleb St-Denis +// Definitions by: Diego Vilar +// Georgii Dolzhykov +// Caleb St-Denis +// Leonard Thieu // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 diff --git a/types/angular/jqlite.d.ts b/types/angular/jqlite.d.ts index 36509143fa..016411c848 100644 --- a/types/angular/jqlite.d.ts +++ b/types/angular/jqlite.d.ts @@ -796,7 +796,9 @@ interface JQueryEventObject extends BaseJQueryEventObject, JQueryInputEventObjec /** * The interface used to specify the properties parameter in css() */ -type cssPropertySetter = (index: number, value?: string) => string | number; +interface cssPropertySetter { + (index: number, value?: string): string | number; +} interface JQueryCssProperties { [propertyName: string]: string | number | cssPropertySetter; } diff --git a/types/jquery/v1/index.d.ts b/types/jquery/v1/index.d.ts index a3c2d42979..ee66781019 100644 --- a/types/jquery/v1/index.d.ts +++ b/types/jquery/v1/index.d.ts @@ -702,7 +702,9 @@ interface JQueryCoordinates { /** * The interface used to specify the properties parameter in css() */ -type cssPropertySetter = (index: number, value?: string) => string | number; +interface cssPropertySetter { + (index: number, value?: string): string | number; +} interface JQueryCssProperties { [propertyName: string]: string | number | cssPropertySetter; } diff --git a/types/jquery/v2/index.d.ts b/types/jquery/v2/index.d.ts index b01e4ceda7..9d30f12c38 100644 --- a/types/jquery/v2/index.d.ts +++ b/types/jquery/v2/index.d.ts @@ -702,7 +702,9 @@ interface JQueryCoordinates { /** * The interface used to specify the properties parameter in css() */ -type cssPropertySetter = (index: number, value?: string) => string | number; +interface cssPropertySetter { + (index: number, value?: string): string | number; +} interface JQueryCssProperties { [propertyName: string]: string | number | cssPropertySetter; } From 4bbd7803bd9f2faba8cb22333b763ed82d2549f0 Mon Sep 17 00:00:00 2001 From: Leonard Thieu Date: Mon, 26 Jun 2017 17:55:25 -0400 Subject: [PATCH 2/3] [angular][jquery] Workaround duplicate index signature. --- types/angular/jqlite.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/types/angular/jqlite.d.ts b/types/angular/jqlite.d.ts index 016411c848..7c8975b8bb 100644 --- a/types/angular/jqlite.d.ts +++ b/types/angular/jqlite.d.ts @@ -169,7 +169,7 @@ interface JQuery { * @param properties An object of property-value pairs to set. * @see {@link https://api.jquery.com/css/#css-properties} */ - css(properties: JQueryCssProperties): JQuery; + css(properties: JQLiteCssProperties): JQuery; /** * Store arbitrary data associated with the matched elements. @@ -799,6 +799,6 @@ interface JQueryEventObject extends BaseJQueryEventObject, JQueryInputEventObjec interface cssPropertySetter { (index: number, value?: string): string | number; } -interface JQueryCssProperties { +interface JQLiteCssProperties { [propertyName: string]: string | number | cssPropertySetter; } From 70e1029f3a6f52262ab1881e0129cfa9920fc038 Mon Sep 17 00:00:00 2001 From: Leonard Thieu Date: Mon, 26 Jun 2017 18:17:27 -0400 Subject: [PATCH 3/3] [angular] Linty --- types/angular/jqlite.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/types/angular/jqlite.d.ts b/types/angular/jqlite.d.ts index 7c8975b8bb..ee7d6acf1c 100644 --- a/types/angular/jqlite.d.ts +++ b/types/angular/jqlite.d.ts @@ -796,6 +796,7 @@ interface JQueryEventObject extends BaseJQueryEventObject, JQueryInputEventObjec /** * The interface used to specify the properties parameter in css() */ +// tslint:disable-next-line:class-name interface cssPropertySetter { (index: number, value?: string): string | number; }