Skip to content

Make processTaggedTemplateExpression visit a returned node - #38596

Merged
Eli Barzilay (elibarzilay) merged 1 commit into
microsoft:masterfrom
elibarzilay:38558
May 15, 2020
Merged

Make processTaggedTemplateExpression visit a returned node#38596
Eli Barzilay (elibarzilay) merged 1 commit into
microsoft:masterfrom
elibarzilay:38558

Conversation

@elibarzilay

Copy link
Copy Markdown
Contributor

This problem was introduced in 70399e1 (from PR #23801), which added
a visitTaggedTemplateExpression case for TaggedTemplateExpression,
before that, it would fallback to the default of visitNode. So re-add
that happen in processTaggedTemplateExpression.

Since it doesn't hurt, I left a Debug.checkDefined(property.name)
instead of !-ing it.

Fixes#38558.

Comment threadsrc/compiler/transformers/es2015.ts

@KingwlWenlu Wang (Kingwl) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, my bad.

This problem was introduced in 70399e1 (from PR microsoft#23801), which added
a `visitTaggedTemplateExpression` case for `TaggedTemplateExpression`,
before that, it would fallback to the default of `visitNode`. So re-add
that happen in `processTaggedTemplateExpression`.
Since it doesn't hurt, I left a `Debug.checkDefined(property.name)`
instead of `!`-ing it.
Fixesmicrosoft#38558.
@eliasjnior

Copy link
Copy Markdown

I could run with yarn add typescript@3.8.3 and the error stoped!

@dandrei

Copy link
Copy Markdown

Elias Junior (@eliasjnior) that's because the problem didn't exist in 3.8.3.
But the problem is still present in 3.9.3. See: vercel/next.js#12854

@elibarzilay

Copy link
Copy Markdown
ContributorAuthor

Andrei (@dandrei): this is most likely a different problem -- #38383 (which I couldn't reproduce).

@microsoftMicrosoft (microsoft) locked as resolved and limited conversation to collaborators Oct 21, 2025
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Visitor throws Cannot read property 'kind' of undefined using TypeScript@3.9.2

7 participants

@elibarzilay@eliasjnior@dandrei@rbuckton@RyanCavanaugh@Kingwl@typescript-bot