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
Error at the rest property telling me it must be last in the object literal.
Actual behavior:
TypeError: Cannot read property 'kind' of undefined
at Object.isIdentifier (/Users/klaus/code/wotan/node_modules/typescript/lib/tsc.js:10379:21)
at getLiteralTypeFromPropertyName (/Users/klaus/code/wotan/node_modules/typescript/lib/tsc.js:32919:23)
at Object.map (/Users/klaus/code/wotan/node_modules/typescript/lib/tsc.js:378:29)
at getRestType (/Users/klaus/code/wotan/node_modules/typescript/lib/tsc.js:29001:47)
at checkObjectLiteralDestructuringPropertyAssignment (/Users/klaus/code/wotan/node_modules/typescript/lib/tsc.js:43019:28)
at checkObjectLiteralAssignment (/Users/klaus/code/wotan/node_modules/typescript/lib/tsc.js:42988:17)
at checkDestructuringAssignment (/Users/klaus/code/wotan/node_modules/typescript/lib/tsc.js:43091:24)
at checkBinaryLikeExpression (/Users/klaus/code/wotan/node_modules/typescript/lib/tsc.js:43171:24)
at checkBinaryExpression (/Users/klaus/code/wotan/node_modules/typescript/lib/tsc.js:43166:20)
at checkExpressionWorker (/Users/klaus/code/wotan/node_modules/typescript/lib/tsc.js:43728:28)
Don't know if is the same cause, but I'm having the same error with the following code that, although is weird, tsc is not emitting any diagnostics and it crash without stacktrace (was able to get a stacktrace with ts-node).
class C<S> {
a={}
m(s: S) {
const b = { ...this.a, ...s } = { }
}
}
/home/sg/git/jsx-alone/jsx-alone-dom-extra/node_modules/typescript/lib/tsc.js:71491
throw e;
^
TypeError: Cannot read property 'kind' of undefined
at Object.isIdentifier (/home/sg/git/jsx-alone/jsx-alone-dom-extra/node_modules/typescript/lib/tsc.js:10382:21)
at getLiteralTypeFromPropertyName (/home/sg/git/jsx-alone/jsx-alone-dom-extra/node_modules/typescript/lib/tsc.js:32924:23)
at Object.map (/home/sg/git/jsx-alone/jsx-alone-dom-extra/node_modules/typescript/lib/tsc.js:378:29)
at getRestType (/home/sg/git/jsx-alone/jsx-alone-dom-extra/node_modules/typescript/lib/tsc.js:29004:47)
at checkObjectLiteralDestructuringPropertyAssignment (/home/sg/git/jsx-alone/jsx-alone-dom-extra/node_modules/typescript/lib/tsc.js:43034:28)
at checkObjectLiteralAssignment (/home/sg/git/jsx-alone/jsx-alone-dom-extra/node_modules/typescript/lib/tsc.js:43003:17)
at checkDestructuringAssignment (/home/sg/git/jsx-alone/jsx-alone-dom-extra/node_modules/typescript/lib/tsc.js:43106:24)
at checkBinaryLikeExpression (/home/sg/git/jsx-alone/jsx-alone-dom-extra/node_modules/typescript/lib/tsc.js:43186:24)
at checkBinaryExpression (/home/sg/git/jsx-alone/jsx-alone-dom-extra/node_modules/typescript/lib/tsc.js:43181:20)
at checkExpressionWorker (/home/sg/git/jsx-alone/jsx-alone-dom-extra/node_modules/typescript/lib/tsc.js:43743:28)
TypeScript Version: 3.3.0-dev.20190124
Search Terms:
Code
Expected behavior:
Error at the rest property telling me it must be last in the object literal.
Actual behavior:
Playground Link: https://typescript-play.js.org/#code/BQbwdBAeA0AECGBfWBeWJ4C5YEZEEoBuIA (open devtools to see the exceptions)
Related Issues:
The text was updated successfully, but these errors were encountered: