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
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)
checkVariableLikeDeclaration calls getPropertyOfType using getTextOfPropertyName(name), but that is undefined for a computed name. (See #18217 comment in getTextOfPropertyName.) To do this properly we need a function that can find a property for an indexed access. That could also fix #26328.
TypeScript Version: 3.1.0-dev.20180809, 3.0.1
Search Terms:
Cannot read property 'charCodeAt' of undefined
Code
Expected behavior:
No crash, code compiled
Actual behavior:
Cannot read property 'charCodeAt' of undefined
Playground Link:
Note, that the code is not compiled
The text was updated successfully, but these errors were encountered: