You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Stack overflow with circular mapped type and conditional type #26448
typeCond<T>=Textendsnumber ? number : never;declarefunctionfunction1<Textends{[KinkeyofT]: Cond<T[K]>}>(): T[keyofT]["foo"];
Expected behavior: Compilation completes.
Actual behavior:
REDACTED/typescript/built/local/tsc.js:83794
throw e;
^
RangeError: Maximum call stack size exceeded
at getSimplifiedIndexedAccessType (REDACTED/typescript/built/local/tsc.js:37856:48)
at getSimplifiedType (REDACTED/typescript/built/local/tsc.js:37852:63)
at getConstraintOfDistributiveConditionalType (REDACTED/typescript/built/local/tsc.js:35728:54)
at getConstraintOfConditionalType (REDACTED/typescript/built/local/tsc.js:35740:20)
at getConstraintOfType (REDACTED/typescript/built/local/tsc.js:35701:62)
at getConstraintOfDistributiveConditionalType (REDACTED/typescript/built/local/tsc.js:35728:34)
at getConstraintOfConditionalType (REDACTED/typescript/built/local/tsc.js:35740:20)
at getConstraintOfType (REDACTED/typescript/built/local/tsc.js:35701:62)
at getConstraintOfDistributiveConditionalType (REDACTED/typescript/built/local/tsc.js:35728:34)
at getConstraintOfConditionalType (REDACTED/typescript/built/local/tsc.js:35740:20)
Activity