{"action":"created","issue":{"url":"https://api.github.com/repos/Microsoft/TypeScript/issues/5305","labels_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/5305/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/5305/comments","events_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/5305/events","html_url":"https://github.com/Microsoft/TypeScript/issues/5305","id":111968618,"number":5305,"title":"allow any property name as return type","user":{"login":"heycalmdown","id":154198,"avatar_url":"https://avatars.githubusercontent.com/u/154198?v=3","gravatar_id":"","url":"https://api.github.com/users/heycalmdown","html_url":"https://github.com/heycalmdown","followers_url":"https://api.github.com/users/heycalmdown/followers","following_url":"https://api.github.com/users/heycalmdown/following{/other_user}","gists_url":"https://api.github.com/users/heycalmdown/gists{/gist_id}","starred_url":"https://api.github.com/users/heycalmdown/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/heycalmdown/subscriptions","organizations_url":"https://api.github.com/users/heycalmdown/orgs","repos_url":"https://api.github.com/users/heycalmdown/repos","events_url":"https://api.github.com/users/heycalmdown/events{/privacy}","received_events_url":"https://api.github.com/users/heycalmdown/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Microsoft/TypeScript/labels/Question","name":"Question","color":"d4c5f9"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":16,"created_at":"2015-10-17T15:30:01Z","updated_at":"2015-10-25T22:21:05Z","closed_at":null,"body":"I have an issue during writing a piece of declaration for existing node.js module - bluebird.js. The module has a method named `props` which gets an object has promises in it then return an object have same property names. It seems like object-version `map`. I wanted to add types for that.\r\n\r\nFor `all` I can easily get the types like\r\n\r\n```typescript\r\n  static all<T1, T2>(values: [Promise.Thenable<T1>, Promise.Thenable<T2>]): Promise<[T1, T2]>;\r\n  static all<T1, T2, T3>(values: [Promise.Thenable<T1>, Promise.Thenable<T2>, Promise.Thenable<T3>]): Promise<[T1, T2, T3]>;\r\n  // ...\r\n```\r\n\r\nBut for `props` the other hand,\r\n\r\n```typescript\r\n  static props<T1>(object: {[k:string]: Promise.Thenable<T1>}): Promise<{[k:string]: T1}>;\r\n```\r\n\r\nI'm getting this\r\n\r\n```\r\nbluebird/bluebird-tests.ts(530,10): error TS2339: Property 'foo' does not exist on type '{ [k: string]: Foo; }'.\r\nbluebird/bluebird-tests.ts(534,10): error TS2339: Property 'bar' does not exist on type '{ [k: string]: Bar; }'.\r\n```\r\n\r\nIs there any tip for issue like this?"},"comment":{"url":"https://api.github.com/repos/Microsoft/TypeScript/issues/comments/150980004","html_url":"https://github.com/Microsoft/TypeScript/issues/5305#issuecomment-150980004","issue_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/5305","id":150980004,"user":{"login":"heycalmdown","id":154198,"avatar_url":"https://avatars.githubusercontent.com/u/154198?v=3","gravatar_id":"","url":"https://api.github.com/users/heycalmdown","html_url":"https://github.com/heycalmdown","followers_url":"https://api.github.com/users/heycalmdown/followers","following_url":"https://api.github.com/users/heycalmdown/following{/other_user}","gists_url":"https://api.github.com/users/heycalmdown/gists{/gist_id}","starred_url":"https://api.github.com/users/heycalmdown/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/heycalmdown/subscriptions","organizations_url":"https://api.github.com/users/heycalmdown/orgs","repos_url":"https://api.github.com/users/heycalmdown/repos","events_url":"https://api.github.com/users/heycalmdown/events{/privacy}","received_events_url":"https://api.github.com/users/heycalmdown/received_events","type":"User","site_admin":false},"created_at":"2015-10-25T22:21:05Z","updated_at":"2015-10-25T22:21:05Z","body":"Okay, TS can't handle those kind of usage. Thanks. That's what I want to be confirmed."}}