{"action":"created","issue":{"url":"https://api.github.com/repos/Microsoft/TypeScript/issues/21611","repository_url":"https://api.github.com/repos/Microsoft/TypeScript","labels_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/21611/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/21611/comments","events_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/21611/events","html_url":"https://github.com/Microsoft/TypeScript/issues/21611","id":294154035,"number":21611,"title":"Exception in `quickInfo` with conditional types","user":{"login":"rbuckton","id":3902892,"avatar_url":"https://avatars2.githubusercontent.com/u/3902892?v=4","gravatar_id":"","url":"https://api.github.com/users/rbuckton","html_url":"https://github.com/rbuckton","followers_url":"https://api.github.com/users/rbuckton/followers","following_url":"https://api.github.com/users/rbuckton/following{/other_user}","gists_url":"https://api.github.com/users/rbuckton/gists{/gist_id}","starred_url":"https://api.github.com/users/rbuckton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rbuckton/subscriptions","organizations_url":"https://api.github.com/users/rbuckton/orgs","repos_url":"https://api.github.com/users/rbuckton/repos","events_url":"https://api.github.com/users/rbuckton/events{/privacy}","received_events_url":"https://api.github.com/users/rbuckton/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-02-03T23:23:45Z","updated_at":"2018-02-03T23:27:23Z","closed_at":null,"author_association":"MEMBER","body":"**TypeScript Version:**  2.8.0-dev (master)\r\n\r\n**Code**\r\n\r\n```ts\r\ninterface Awaiters<T> {\r\n    0: T extends PromiseLike<any> ? never : T;\r\n    1: Awaiter<T, 0>;\r\n    [depth: number]: Awaiters<T>[keyof Awaiters<T>];\r\n}\r\ntype Awaiter<T, Depth extends number> = T extends PromiseLike<infer U> ? Awaiters<U>[Depth] : never;\r\ntype Awaited<T> = Awaiters<T>[keyof Awaiters<T>];\r\n\r\ninterface BadPromise {\r\n    then(onfulfilled: (value: BadPromise ) => void): any;\r\n}\r\n\r\ntype T1 = Awaited<BadPromise>;\r\n```\r\n\r\n**Repro steps:**\r\n\r\n1. Open a new TS file in VS Code with the above source text.\r\n1. Ensure the VS Code Output window is open with the TypeScript extension output active.\r\n2. Hover over `T1` above.\r\n\r\n**Expected behavior:**\r\n\r\nQuick Info reports `type T1 = never;`\r\n\r\n**Actual behavior:**\r\n\r\nException in `quickInfo`:\r\n\r\n```\r\n[Error  - 3:19:57 PM] 'quickinfo' request failed with error.\r\nError processing request. Maximum call stack size exceeded\r\nRangeError: Maximum call stack size exceeded\r\n    at getSymbolLinks (c:\\dev\\TypeScript\\built\\local\\tsserver.js:21829:32)\r\n    at instantiateSymbol (c:\\dev\\TypeScript\\built\\local\\tsserver.js:27969:25)\r\n    at instantiateList (c:\\dev\\TypeScript\\built\\local\\tsserver.js:27867:34)\r\n    at instantiateSignature (c:\\dev\\TypeScript\\built\\local\\tsserver.js:27963:165)\r\n    at getBaseSignature (c:\\dev\\TypeScript\\built\\local\\tsserver.js:26524:24)\r\n    at inferFromSignatures (c:\\dev\\TypeScript\\built\\local\\tsserver.js:30358:97)\r\n    at inferFromObjectTypes (c:\\dev\\TypeScript\\built\\local\\tsserver.js:30336:21)\r\n    at inferFromTypes (c:\\dev\\TypeScript\\built\\local\\tsserver.js:30278:29)\r\n    at inferFromProperties (c:\\dev\\TypeScript\\built\\local\\tsserver.js:30347:25)\r\n    at inferFromObjectTypes (c:\\dev\\TypeScript\\built\\local\\tsserver.js:30335:21)\r\n    at inferFromTypes (c:\\dev\\TypeScript\\built\\local\\tsserver.js:30278:29)\r\n    at inferTypes (c:\\dev\\TypeScript\\built\\local\\tsserver.js:30129:13)\r\n    at getConditionalType (c:\\dev\\TypeScript\\built\\local\\tsserver.js:27548:17)\r\n    at instantiateConditionalType (c:\\dev\\TypeScript\\built\\local\\tsserver.js:28086:20)\r\n    at c:\\dev\\TypeScript\\built\\local\\tsserver.js:28080:76\r\n    at mapType (c:\\dev\\TypeScript\\built\\local\\tsserver.js:30926:25)\r\n    at getConditionalTypeInstantiation (c:\\dev\\TypeScript\\built\\local\\tsserver.js:28080:28)\r\n    at instantiateType (c:\\dev\\TypeScript\\built\\local\\tsserver.js:28124:28)\r\n    at instantiateList (c:\\dev\\TypeScript\\built\\local\\tsserver.js:27872:41)\r\n    at instantiateTypes (c:\\dev\\TypeScript\\built\\local\\tsserver.js:27881:20)\r\n    at instantiateType (c:\\dev\\TypeScript\\built\\local\\tsserver.js:28109:36)\r\n    at instantiateIndexInfo (c:\\dev\\TypeScript\\built\\local\\tsserver.js:28137:44)\r\n    at resolveObjectTypeMembers (c:\\dev\\TypeScript\\built\\local\\tsserver.js:25386:35)\r\n    at resolveTypeReferenceMembers (c:\\dev\\TypeScript\\built\\local\\tsserver.js:25419:13)\r\n    at resolveStructuredTypeMembers (c:\\dev\\TypeScript\\built\\local\\tsserver.js:25762:25)\r\n    at getPropertyOfType (c:\\dev\\TypeScript\\built\\local\\tsserver.js:26085:32)\r\n    at getPropertyTypeForIndexType (c:\\dev\\TypeScript\\built\\local\\tsserver.js:27363:28)\r\n    at getIndexedAccessType (c:\\dev\\TypeScript\\built\\local\\tsserver.js:27503:20)\r\n    at instantiateType (c:\\dev\\TypeScript\\built\\local\\tsserver.js:28121:28)\r\n    at getConditionalType (c:\\dev\\TypeScript\\built\\local\\tsserver.js:27558:24)\r\n    at instantiateConditionalType (c:\\dev\\TypeScript\\built\\local\\tsserver.js:28086:20)\r\n    at c:\\dev\\TypeScript\\built\\local\\tsserver.js:28080:76\r\n    ...\r\n    at mapType (c:\\dev\\TypeScript\\built\\local\\tsserver.js:30926:25)\r\n    at getConditionalTypeInstantiation (c:\\dev\\TypeScript\\built\\local\\tsserver.js:28080:28)\r\n    at instantiateType (c:\\dev\\TypeScript\\built\\local\\tsserver.js:28124:28)\r\n    at instantiateList (c:\\dev\\TypeScript\\built\\local\\tsserver.js:27872:41)\r\n    at instantiateTypes (c:\\dev\\TypeScript\\built\\local\\tsserver.js:27881:20)\r\n    at instantiateType (c:\\dev\\TypeScript\\built\\local\\tsserver.js:28109:36)\r\n    at instantiateIndexInfo (c:\\dev\\TypeScript\\built\\local\\tsserver.js:28137:44)\r\n    at resolveObjectTypeMembers (c:\\dev\\TypeScript\\built\\local\\tsserver.js:25386:35)\r\n    at resolveTypeReferenceMembers (c:\\dev\\TypeScript\\built\\local\\tsserver.js:25419:13)\r\n    at resolveStructuredTypeMembers (c:\\dev\\TypeScript\\built\\local\\tsserver.js:25762:25)\r\n    at getPropertyOfType (c:\\dev\\TypeScript\\built\\local\\tsserver.js:26085:32)\r\n    at getPropertyTypeForIndexType (c:\\dev\\TypeScript\\built\\local\\tsserver.js:27363:28)\r\n    at getIndexedAccessType (c:\\dev\\TypeScript\\built\\local\\tsserver.js:27503:20)\r\n    at instantiateType (c:\\dev\\TypeScript\\built\\local\\tsserver.js:28121:28)\r\n    at getConditionalType (c:\\dev\\TypeScript\\built\\local\\tsserver.js:27558:24)\r\n    at instantiateConditionalType (c:\\dev\\TypeScript\\built\\local\\tsserver.js:28086:20)\r\n    at c:\\dev\\TypeScript\\built\\local\\tsserver.js:28080:76\r\n```"},"comment":{"url":"https://api.github.com/repos/Microsoft/TypeScript/issues/comments/362865374","html_url":"https://github.com/Microsoft/TypeScript/issues/21611#issuecomment-362865374","issue_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/21611","id":362865374,"user":{"login":"rbuckton","id":3902892,"avatar_url":"https://avatars2.githubusercontent.com/u/3902892?v=4","gravatar_id":"","url":"https://api.github.com/users/rbuckton","html_url":"https://github.com/rbuckton","followers_url":"https://api.github.com/users/rbuckton/followers","following_url":"https://api.github.com/users/rbuckton/following{/other_user}","gists_url":"https://api.github.com/users/rbuckton/gists{/gist_id}","starred_url":"https://api.github.com/users/rbuckton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rbuckton/subscriptions","organizations_url":"https://api.github.com/users/rbuckton/orgs","repos_url":"https://api.github.com/users/rbuckton/repos","events_url":"https://api.github.com/users/rbuckton/events{/privacy}","received_events_url":"https://api.github.com/users/rbuckton/received_events","type":"User","site_admin":false},"created_at":"2018-02-03T23:27:23Z","updated_at":"2018-02-03T23:27:23Z","author_association":"MEMBER","body":"There is also a similar error reported in `getApplicableRefactors`:\r\n\r\n```\r\n[Error  - 3:19:59 PM] 'getApplicableRefactors' request failed with error.\r\nError processing request. Maximum call stack size exceeded\r\nRangeError: Maximum call stack size exceeded\r\n    at resolveStructuredTypeMembers (c:\\dev\\TypeScript\\built\\local\\tsserver.js:25758:46)\r\n    at getSignaturesOfStructuredType (c:\\dev\\TypeScript\\built\\local\\tsserver.js:26105:32)\r\n    at getSignaturesOfType (c:\\dev\\TypeScript\\built\\local\\tsserver.js:26111:20)\r\n    at inferFromSignatures (c:\\dev\\TypeScript\\built\\local\\tsserver.js:30352:40)\r\n    at inferFromObjectTypes (c:\\dev\\TypeScript\\built\\local\\tsserver.js:30336:21)\r\n    at inferFromTypes (c:\\dev\\TypeScript\\built\\local\\tsserver.js:30278:29)\r\n    at inferFromProperties (c:\\dev\\TypeScript\\built\\local\\tsserver.js:30347:25)\r\n    at inferFromObjectTypes (c:\\dev\\TypeScript\\built\\local\\tsserver.js:30335:21)\r\n    at inferFromTypes (c:\\dev\\TypeScript\\built\\local\\tsserver.js:30278:29)\r\n    at inferTypes (c:\\dev\\TypeScript\\built\\local\\tsserver.js:30129:13)\r\n    at getConditionalType (c:\\dev\\TypeScript\\built\\local\\tsserver.js:27548:17)\r\n    at instantiateConditionalType (c:\\dev\\TypeScript\\built\\local\\tsserver.js:28086:20)\r\n    at getConditionalTypeInstantiation (c:\\dev\\TypeScript\\built\\local\\tsserver.js:28083:20)\r\n    at instantiateType (c:\\dev\\TypeScript\\built\\local\\tsserver.js:28124:28)\r\n    at instantiateList (c:\\dev\\TypeScript\\built\\local\\tsserver.js:27872:41)\r\n    at instantiateTypes (c:\\dev\\TypeScript\\built\\local\\tsserver.js:27881:20)\r\n    at instantiateType (c:\\dev\\TypeScript\\built\\local\\tsserver.js:28109:36)\r\n    at instantiateIndexInfo (c:\\dev\\TypeScript\\built\\local\\tsserver.js:28137:44)\r\n    at resolveObjectTypeMembers (c:\\dev\\TypeScript\\built\\local\\tsserver.js:25386:35)\r\n    at resolveTypeReferenceMembers (c:\\dev\\TypeScript\\built\\local\\tsserver.js:25419:13)\r\n    at resolveStructuredTypeMembers (c:\\dev\\TypeScript\\built\\local\\tsserver.js:25762:25)\r\n    at getPropertyOfType (c:\\dev\\TypeScript\\built\\local\\tsserver.js:26085:32)\r\n    at getPropertyTypeForIndexType (c:\\dev\\TypeScript\\built\\local\\tsserver.js:27363:28)\r\n    at getIndexedAccessType (c:\\dev\\TypeScript\\built\\local\\tsserver.js:27503:20)\r\n    at instantiateType (c:\\dev\\TypeScript\\built\\local\\tsserver.js:28121:28)\r\n    at getConditionalType (c:\\dev\\TypeScript\\built\\local\\tsserver.js:27558:24)\r\n    at instantiateConditionalType (c:\\dev\\TypeScript\\built\\local\\tsserver.js:28086:20)\r\n    at getConditionalTypeInstantiation (c:\\dev\\TypeScript\\built\\local\\tsserver.js:28083:20)\r\n    at instantiateType (c:\\dev\\TypeScript\\built\\local\\tsserver.js:28124:28)\r\n    at instantiateList (c:\\dev\\TypeScript\\built\\local\\tsserver.js:27872:41)\r\n    at instantiateTypes (c:\\dev\\TypeScript\\built\\local\\tsserver.js:27881:20)\r\n    at instantiateType (c:\\dev\\TypeScript\\built\\local\\tsserver.js:28109:36)\r\n    at instantiateIndexInfo (c:\\dev\\TypeScript\\built\\local\\tsserver.js:28137:44)\r\n    at resolveObjectTypeMembers (c:\\dev\\TypeScript\\built\\local\\tsserver.js:25386:35)\r\n    at resolveTypeReferenceMembers (c:\\dev\\TypeScript\\built\\local\\tsserver.js:25419:13)\r\n    at resolveStructuredTypeMembers (c:\\dev\\TypeScript\\built\\local\\tsserver.js:25762:25)\r\n    at getPropertyOfType (c:\\dev\\TypeScript\\built\\local\\tsserver.js:26085:32)\r\n    at getPropertyTypeForIndexType (c:\\dev\\TypeScript\\built\\local\\tsserver.js:27363:28)\r\n    at getIndexedAccessType (c:\\dev\\TypeScript\\built\\local\\tsserver.js:27503:20)\r\n    at instantiateType (c:\\dev\\TypeScript\\built\\local\\tsserver.js:28121:28)\r\n    at getConditionalType (c:\\dev\\TypeScript\\built\\local\\tsserver.js:27558:24)\r\n    at instantiateConditionalType (c:\\dev\\TypeScript\\built\\local\\tsserver.js:28086:20)\r\n    at getConditionalTypeInstantiation (c:\\dev\\TypeScript\\built\\local\\tsserver.js:28083:20)\r\n    ...\r\n```"}}
{"actor":{"display_login":"rbuckton"}}