Title: Visitor throws `Cannot read property 'kind' of undefined` using TypeScript@3.9.2 · Issue #38558 · microsoft/TypeScript · GitHub
Open Graph Title: Visitor throws `Cannot read property 'kind' of undefined` using TypeScript@3.9.2 · Issue #38558 · microsoft/TypeScript
X Title: Visitor throws `Cannot read property 'kind' of undefined` using TypeScript@3.9.2 · Issue #38558 · microsoft/TypeScript
Description: TypeScript Version: 🔴3.9.2 🔴3.9.1-rc 🔴3.9.0-beta ✅3.8.3 (it work with previous versions) Search Terms: Visitor TypeError kind undefined 85032 Code Unknown (Error is thrown at node_modules/typescript/lib/typescript.js:85032:35) But this p...
Open Graph Description: TypeScript Version: 🔴3.9.2 🔴3.9.1-rc 🔴3.9.0-beta ✅3.8.3 (it work with previous versions) Search Terms: Visitor TypeError kind undefined 85032 Code Unknown (Error is thrown at node_modules/typescrip...
X Description: TypeScript Version: 🔴3.9.2 🔴3.9.1-rc 🔴3.9.0-beta ✅3.8.3 (it work with previous versions) Search Terms: Visitor TypeError kind undefined 85032 Code Unknown (Error is thrown at node_modules/typescrip...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/38558
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Visitor throws `Cannot read property 'kind' of undefined` using TypeScript@3.9.2","articleBody":"**TypeScript Version:** \r\n- 🔴`3.9.2`\r\n- 🔴`3.9.1-rc`\r\n- 🔴`3.9.0-beta`\r\n- ✅`3.8.3` (it work with previous versions)\r\n\r\n\r\n\u003c!-- Search terms you tried before logging this (so others can find this issue more easily) --\u003e\r\n**Search Terms:**\r\nVisitor TypeError kind undefined 85032\r\n\r\n**Code**\r\n\r\n_Unknown_ (Error is thrown at `node_modules/typescript/lib/typescript.js:85032:35`)\r\n\r\nBut this part triggers it\r\n```ts\r\nexport interface ColorProps {\r\n style?: CSSProperties\r\n}\r\n\r\nconst Color = styled(({ style }: ColorProps) =\u003e (\r\n \u003cdiv\r\n style={{\r\n ...style,\r\n background: `anything`,\r\n }}\r\n /\u003e\r\n))``\r\n```\r\n\r\n**Expected behavior:**\r\n\r\nIt compiles\r\n\r\n**Actual behavior:**\r\n```\r\n TypeError: Cannot read property 'kind' of undefined\r\n\r\n at visitObjectLiteralExpression (node_modules/typescript/lib/typescript.js:85032:35)\r\n at visitJavaScript (node_modules/typescript/lib/typescript.js:83441:28)\r\n at visitor (node_modules/typescript/lib/typescript.js:83384:24)\r\n at visitNode (node_modules/typescript/lib/typescript.js:74768:23)\r\n at Object.visitEachChild (node_modules/typescript/lib/typescript.js:75209:108)\r\n at visitJavaScript (node_modules/typescript/lib/typescript.js:83491:31)\r\n at visitor (node_modules/typescript/lib/typescript.js:83384:24)\r\n at visitNodes (node_modules/typescript/lib/typescript.js:74819:48)\r\n at Object.visitEachChild (node_modules/typescript/lib/typescript.js:75034:53)\r\n at visitObjectLiteralExpression (node_modules/typescript/lib/typescript.js:85057:23)\r\n```\r\n\r\n**Playground Link:** \u003c!-- A link to a TypeScript Playground \"Share\" link which demonstrates this behavior --\u003e\r\n\r\n- minimal reproducible repository - https://github.com/lukaskl/typescript-visitor-bug-report\r\n\r\n**Related Issues:** \u003c!-- Did you find other bugs that looked similar? --\u003e\r\n\r\n- #38383, this report _could be_ duplicate of #38383, however, the error message is really a generic one and this error is thrown at a completely different place - therefore, for me it seems like a different issue (sorry in advance if this will turn out as a duplicate 👀).","author":{"url":"https://github.com/lukaskl","@type":"Person","name":"lukaskl"},"datePublished":"2020-05-13T22:16:45.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":6},"url":"https://github.com/38558/TypeScript/issues/38558"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:8d78b815-2f97-6bb5-7b73-2e94389b0258 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A7A6:A3FE5:C386DF:1178C68:6A631DCA |
| html-safe-nonce | 65d07151e1216c5e85910e84184dcaff72fbfd50f91f197250b145807b813eff |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBN0E2OkEzRkU1OkMzODZERjoxMTc4QzY4OjZBNjMxRENBIiwidmlzaXRvcl9pZCI6IjgyMjQxMzY4NDA4NjM0OTI1OCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 4e67eed1eaae22b7a2c0fb65890e7f018a8c05aa2dd5fc389d3e63d4a983ef9d |
| hovercard-subject-tag | issue:617789780 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/microsoft/TypeScript/38558/issue_layout |
| twitter:image | https://opengraph.githubassets.com/b23cc45fcb6d75b4d43a1bd524864037608392a033d309eeeebe73eac6fb9e57/microsoft/TypeScript/issues/38558 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/b23cc45fcb6d75b4d43a1bd524864037608392a033d309eeeebe73eac6fb9e57/microsoft/TypeScript/issues/38558 |
| og:image:alt | TypeScript Version: 🔴3.9.2 🔴3.9.1-rc 🔴3.9.0-beta ✅3.8.3 (it work with previous versions) Search Terms: Visitor TypeError kind undefined 85032 Code Unknown (Error is thrown at node_modules/typescrip... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | lukaskl |
| hostname | github.com |
| expected-hostname | github.com |
| None | 1a6c056e02f174fffc096c521ec0ff6fb83e40a2ec8cb8875466ec1524872dd6 |
| turbo-cache-control | no-preview |
| go-import | github.com/microsoft/TypeScript git https://github.com/microsoft/TypeScript.git |
| octolytics-dimension-user_id | 6154722 |
| octolytics-dimension-user_login | microsoft |
| octolytics-dimension-repository_id | 20929025 |
| octolytics-dimension-repository_nwo | microsoft/TypeScript |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 20929025 |
| octolytics-dimension-repository_network_root_nwo | microsoft/TypeScript |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 6a93e25585f487ddff9e3996c06d5b869d6e1828 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width