@@ -4414,7 +4414,8 @@ declare namespace ts {
44144414 ReachabilityCheckFlags = 768,
44154415 ReachabilityAndEmitFlags = 2816,
44164416 ContextFlags = 50720768,
4417- TypeExcludesFlags = 40960
4417+ TypeExcludesFlags = 40960,
4418+ IdentifierIsInJSDocNamespace = 2048
44184419 }
44194420 enum ModifierFlags {
44204421 None = 0,
@@ -4584,8 +4585,10 @@ declare namespace ts {
45844585 * Text of identifier, but if the identifier begins with two underscores, this will begin with three.
45854586 */
45864587 readonly escapedText: __String;
4588+ /** @deprecated Use `idKeyword(identifier)` instead. */
45874589 readonly originalKeywordKind?: SyntaxKind;
4588- /** @deprecated */ readonly isInJSDocNamespace?: boolean;
4590+ /** @deprecated Use `identifier.flags & NodeFlags.IdentifierIsInJSDocNamespace` instead. */
4591+ readonly isInJSDocNamespace?: boolean;
45894592 }
45904593 interface Identifier {
45914594 readonly text: string;
@@ -8598,6 +8601,11 @@ declare namespace ts {
85988601 */
85998602 function unescapeLeadingUnderscores(identifier: __String): string;
86008603 function idText(identifierOrPrivateName: Identifier | PrivateIdentifier): string;
8604+ /**
8605+ * If the text of an Identifier matches a keyword (including contextual and TypeScript-specific keywords), returns the
8606+ * SyntaxKind for the matching keyword.
8607+ */
8608+ function idKeyword(node: Identifier): SyntaxKind | undefined;
86018609 function symbolName(symbol: Symbol): string;
86028610 function getNameOfJSDocTypedef(declaration: JSDocTypedefTag): Identifier | PrivateIdentifier | undefined;
86038611 function getNameOfDeclaration(declaration: Declaration | Expression | undefined): DeclarationName | undefined;
0 commit comments