mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-26 20:14:05 -05:00
createPrivateIdentifier: names must start with # (#36506)
This commit is contained in:
committed by
GitHub
parent
0cf100dcf8
commit
c42ef575be
@@ -218,6 +218,9 @@ namespace ts {
|
||||
|
||||
// Private Identifiers
|
||||
export function createPrivateIdentifier(text: string): PrivateIdentifier {
|
||||
if (text[0] !== "#") {
|
||||
Debug.fail("First character of private identifier must be #: " + text);
|
||||
}
|
||||
const node = createSynthesizedNode(SyntaxKind.PrivateIdentifier) as PrivateIdentifier;
|
||||
node.escapedText = escapeLeadingUnderscores(text);
|
||||
return node;
|
||||
|
||||
Reference in New Issue
Block a user