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
It compiles and transpiles the object spread operator to a call to Object.assign.
Actual behavior:
The object spread operator is not transpiled but simply kept. This can lead to the following error:
TypeError: Cannot read property 'kind' of undefined
at visitObjectLiteralExpression (C:\_myplace\next\graphql-proxy\node_modules\typescript\lib\typescript.js:56775:34)
at visitJavaScript (C:\_myplace\next\graphql-proxy\node_modules\typescript\lib\typescript.js:55245:28)
at visitor (C:\_myplace\next\graphql-proxy\node_modules\typescript\lib\typescript.js:55182:24)
at visitNode (C:\_myplace\next\graphql-proxy\node_modules\typescript\lib\typescript.js:49197:23)
at Object.visitEachChild (C:\_myplace\next\graphql-proxy\node_modules\typescript\lib\typescript.js:49479:46)
at visitReturnStatement (C:\_myplace\next\graphql-proxy\node_modules\typescript\lib\typescript.js:55345:23)
at visitJavaScript (C:\_myplace\next\graphql-proxy\node_modules\typescript\lib\typescript.js:55293:28)
at visitor (C:\_myplace\next\graphql-proxy\node_modules\typescript\lib\typescript.js:55182:24)
at Object.visitNodes (C:\_myplace\next\graphql-proxy\node_modules\typescript\lib\typescript.js:49248:48)
at transformFunctionBody (C:\_myplace\next\graphql-proxy\node_modules\typescript\lib\typescript.js:56282:44)
Problem source:
The esnext transformer cuts off at method declarations within object literals that have an spread element, thus it never sees the inner object literal node.
TypeScript Version: 2.4.0
compilerOptions.target = ES5
Code
Expected behavior:
It compiles and transpiles the object spread operator to a call to
Object.assign.Actual behavior:
The object spread operator is not transpiled but simply kept. This can lead to the following error:
Problem source:
The esnext transformer cuts off at method declarations within object literals that have an spread element, thus it never sees the inner object literal node.