Skip to content

Comments

fix(ast): handle computed property names in Node.Text#2891

Closed
Zzzen wants to merge 2 commits intomicrosoft:mainfrom
Zzzen:fix/inlay-hints-computed-propery-name
Closed

fix(ast): handle computed property names in Node.Text#2891
Zzzen wants to merge 2 commits intomicrosoft:mainfrom
Zzzen:fix/inlay-hints-computed-propery-name

Conversation

@Zzzen
Copy link
Contributor

@Zzzen Zzzen commented Feb 24, 2026

fix #2890

@ahejlsberg
Copy link
Member

The Node.Text method is intended to just me an accessor for nodes that have a text property. It is not supposed to compute a .String() like representation of the node. I think the fix here is to not call Node.Text in the first place on nodes without a text property.

@jakebailey
Copy link
Member

Yeah, don't let the JSDoc bit fool you, that is just a performance optimization we didn't need in JS due to deferred string building meaning it was rarely read.

@jakebailey
Copy link
Member

#2892

@jakebailey jakebailey closed this Feb 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

panic handling request textDocument/inlayHint

3 participants