typescript 5.0.0-dev.20230112 → 5.0.0-dev.20230114

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4584,12 +4584,16 @@ declare namespace ts {
4584
4584
  * Text of identifier, but if the identifier begins with two underscores, this will begin with three.
4585
4585
  */
4586
4586
  readonly escapedText: __String;
4587
- readonly originalKeywordKind?: SyntaxKind;
4588
- isInJSDocNamespace?: boolean;
4589
4587
  }
4590
4588
  interface Identifier {
4591
4589
  readonly text: string;
4592
4590
  }
4591
+ interface Identifier {
4592
+ /** @deprecated Use `idKeyword(identifier)` instead. */
4593
+ readonly originalKeywordKind?: SyntaxKind;
4594
+ /** @deprecated Use `.parent` or the surrounding context to determine this instead. */
4595
+ readonly isInJSDocNamespace?: boolean;
4596
+ }
4593
4597
  interface TransientIdentifier extends Identifier {
4594
4598
  resolvedSymbol: Symbol;
4595
4599
  }
@@ -8599,6 +8603,11 @@ declare namespace ts {
8599
8603
  */
8600
8604
  function unescapeLeadingUnderscores(identifier: __String): string;
8601
8605
  function idText(identifierOrPrivateName: Identifier | PrivateIdentifier): string;
8606
+ /**
8607
+ * If the text of an Identifier matches a keyword (including contextual and TypeScript-specific keywords), returns the
8608
+ * SyntaxKind for the matching keyword.
8609
+ */
8610
+ function identifierToKeywordKind(node: Identifier): KeywordSyntaxKind | undefined;
8602
8611
  function symbolName(symbol: Symbol): string;
8603
8612
  function getNameOfJSDocTypedef(declaration: JSDocTypedefTag): Identifier | PrivateIdentifier | undefined;
8604
8613
  function getNameOfDeclaration(declaration: Declaration | Expression | undefined): DeclarationName | undefined;