Don't quote Unicode member names in type signatures - #3130
Open
davidpavlovschi wants to merge 1 commit into
Open
Don't quote Unicode member names in type signatures#3130davidpavlovschi wants to merge 1 commit into
davidpavlovschi wants to merge 1 commit into
Conversation
FormattedCodeBuilder.propertyName tested names against an ASCII-only regular expression, so valid identifiers like café or 日本語 were rendered as quoted string literals. Validate each code point with TypeScript's public identifier predicates instead. This accepts exactly the same Unicode identifier table as the supported TypeScript version, including astral-plane characters, without depending on the host Node.js ICU tables.
davidpavlovschi
force-pushed
the
fix/unicode-property-names
branch
from
July 30, 2026 19:28
2a71665 to
a2b3217
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
café,日本語, and astral-plane identifiers without quotes when TypeScript accepts them as identifiersisIdentifierStartandisIdentifierPartpredicates, keeping the formatter aligned with the supported TypeScript version instead of the host Node.js Unicode tablesProblem
FormattedCodeBuilder.propertyName()used an ASCII-only\wexpression. As a result, valid TypeScript names such asöffnenrendered as"öffnen"in type signatures.Validation
node_modules/.bin/hereby buildnode_modules/.bin/hereby test --grep '^Formatter'— 37 passingnode_modules/.bin/hereby lintnode_modules/.bin/tsc -p . --noEmitisIdentifierTextover 2,224,128 bare and continuation strings — 0 mismatchesAI assistance
Claude Opus 5 produced the initial patch and tests. OpenAI Codex independently reviewed the diff, found and removed a host-Unicode/TypeScript-version mismatch, added the TypeScript-table regression, and reran the checks above. The commit retains the Claude co-author trailer.