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
tsc crashes resolving a type of computed property in destructiring assignment #26321
Search Terms:
Cannot read property 'charCodeAt' of undefined
Code
interfaceLimit1{propName: {min: number;max: number};}interfaceLimit2{propName: {min: number;max: number};}typeLimit=Limit1|Limit2;// should be Union typeexportinterfaceMeta{propName: "propName";}functionfoo(meta: Meta,limits: Limit): void{const{[`propName`]: {min: minBonus,max: maxBonus},// should be computed}=limits;}
TypeError: Cannot read property 'charCodeAt' of undefined
at isLateBoundName (.../node_modules/typescript/lib/tsc.js:28756:25)
at createUnionOrIntersectionProperty (.../node_modules/typescript/lib/tsc.js:29638:38)
at getUnionOrIntersectionProperty (.../node_modules/typescript/lib/tsc.js:29699:28)
at getPropertyOfUnionOrIntersectionType (.../node_modules/typescript/lib/tsc.js:29707:28)
at getPropertyOfType (.../node_modules/typescript/lib/tsc.js:29727:24)
at checkVariableLikeDeclaration (.../node_modules/typescript/lib/tsc.js:43025:36)
at checkBindingElement (.../node_modules/typescript/lib/tsc.js:43123:20)
at checkSourceElement (.../node_modules/typescript/lib/tsc.js:44827:28)
at Object.forEach (.../node_modules/typescript/lib/tsc.js:168:30)
at checkVariableLikeDeclaration (.../node_modules/typescript/lib/tsc.js:43036:20)
Activity
martpie commentedon Aug 27, 2018
Andy (Andrewkraft) (@Andy-MS) Has it been released yet? I am facing this issue too.
Or can you recommend a way to mitigate it in the meantime?