diff --git a/types/angular-block-ui/index.d.ts b/types/angular-block-ui/index.d.ts index bf311b04a1..7733bc72f7 100644 --- a/types/angular-block-ui/index.d.ts +++ b/types/angular-block-ui/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/McNull/angular-block-ui // Definitions by: Lasse Nørregaard , Stephan Classen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 import * as angular from "angular"; diff --git a/types/angular-gridster/index.d.ts b/types/angular-gridster/index.d.ts index 272470bc6f..3d4fbbe799 100644 --- a/types/angular-gridster/index.d.ts +++ b/types/angular-gridster/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/ManifestWebDesign/angular-gridster // Definitions by: Joao Monteiro // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 import * as angular from "angular"; diff --git a/types/angular-oauth2/index.d.ts b/types/angular-oauth2/index.d.ts index 23df762df1..1c5e3ac6ed 100644 --- a/types/angular-oauth2/index.d.ts +++ b/types/angular-oauth2/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/oauthjs/angular-oauth2 // Definitions by: Antério Vieira // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 import * as angular from 'angular'; diff --git a/types/angular/angular-tests.ts b/types/angular/angular-tests.ts index fbcce34e81..80b73c062a 100644 --- a/types/angular/angular-tests.ts +++ b/types/angular/angular-tests.ts @@ -337,6 +337,16 @@ namespace TestQ { let result: angular.IPromise<{a: number; b: string; }>; result = $q.all<{a: number; b: string; }>({a: promiseAny, b: promiseAny}); } + { + let result = $q.all({ num: $q.when(2), str: $q.when('test') }); + // TS should infer that num is a number and str is a string + result.then(r => (r.num * 2) + r.str.indexOf('s')); + } + { + let result = $q.all({ num: $q.when(2), str: 'test' }); + // TS should infer that num is a number and str is a string + result.then(r => (r.num * 2) + r.str.indexOf('s')); + } // $q.defer { diff --git a/types/angular/index.d.ts b/types/angular/index.d.ts index 727f1cdd7c..fe78ba03ff 100644 --- a/types/angular/index.d.ts +++ b/types/angular/index.d.ts @@ -1029,8 +1029,7 @@ declare namespace angular { * * @param promises A hash of promises. */ - all(promises: { [id: string]: IPromise; }): IPromise<{ [id: string]: any; }>; - all(promises: { [id: string]: IPromise; }): IPromise; + all(promises: { [K in keyof T]: (IPromise | T[K]); }): IPromise; /** * Creates a Deferred object which represents a task which will finish in the future. */ diff --git a/types/ng-stomp/index.d.ts b/types/ng-stomp/index.d.ts index 3a91a64844..2a2e9c2496 100644 --- a/types/ng-stomp/index.d.ts +++ b/types/ng-stomp/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/beevelop/ng-stomp // Definitions by: Lukasz Potapczuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/ngstorage/index.d.ts b/types/ngstorage/index.d.ts index 83c740ff0e..ca86f3d1a8 100644 --- a/types/ngstorage/index.d.ts +++ b/types/ngstorage/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/gsklee/ngStorage // Definitions by: Jakub Pistek // Definitions: https://github.com/kubiq/DefinitelyTyped +// TypeScript Version: 2.3 export namespace ngStorage { interface StorageService { diff --git a/types/qlik-visualizationextensions/index.d.ts b/types/qlik-visualizationextensions/index.d.ts index d4296fca5b..741e9db805 100644 --- a/types/qlik-visualizationextensions/index.d.ts +++ b/types/qlik-visualizationextensions/index.d.ts @@ -2,6 +2,7 @@ // Project: http://help.qlik.com/en-US/sense-developer/3.2/Subsystems/Extensions/Content/extensions-introduction.htm // Definitions by: Konrad Mattheis // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// diff --git a/types/ui-router-extras/index.d.ts b/types/ui-router-extras/index.d.ts index 647263c912..ad3c76d101 100644 --- a/types/ui-router-extras/index.d.ts +++ b/types/ui-router-extras/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/christopherthielen/ui-router-extras // Definitions by: Michael Putters , Marcel van de Kamp , Viktor Smirnov // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 ///