bmad-agent-init
Version:
Windsurf integration for BMAD-METHOD - automatic initialization of bmad-agent in projects
1,880 lines (1,872 loc) • 82.8 kB
TypeScript
import ts from 'typescript';
/**
* Callback type used for {@link forEachComment}.
* @category Callbacks
*/
type ForEachCommentCallback = (fullText: string, comment: ts.CommentRange) => void;
/**
* Iterates over all comments owned by `node` or its children.
* @category Nodes - Other Utilities
* @example
* ```ts
* declare const node: ts.Node;
*
* forEachComment(node, (fullText, comment) => {
* console.log(`Found comment at position ${comment.pos}: '${fullText}'.`);
* });
* ```
*/
declare function forEachComment(node: ts.Node, callback: ForEachCommentCallback, sourceFile?: ts.SourceFile): void;
/**
* An option that can be tested with {@link isCompilerOptionEnabled}.
* @category Compiler Options
*/
type BooleanCompilerOptions = keyof {
[K in keyof ts.CompilerOptions as NonNullable<ts.CompilerOptions[K]> extends boolean ? K : never]: unknown;
};
/**
* Checks if a given compiler option is enabled.
* It handles dependencies of options, e.g. `declaration` is implicitly enabled by `composite` or `strictNullChecks` is enabled by `strict`.
* However, it does not check dependencies that are already checked and reported as errors, e.g. `checkJs` without `allowJs`.
* This function only handles boolean flags.
* @category Compiler Options
* @example
* ```ts
* const options = {
* allowJs: true,
* };
*
* isCompilerOptionEnabled(options, "allowJs"); // true
* isCompilerOptionEnabled(options, "allowSyntheticDefaultImports"); // false
* ```
*/
declare function isCompilerOptionEnabled(options: ts.CompilerOptions, option: BooleanCompilerOptions): boolean;
/**
* An option that can be tested with {@link isStrictCompilerOptionEnabled}.
* @category Compiler Options
*/
type StrictCompilerOption = "alwaysStrict" | "noImplicitAny" | "noImplicitThis" | "strictBindCallApply" | "strictFunctionTypes" | "strictNullChecks" | "strictPropertyInitialization";
/**
* Checks if a given compiler option is enabled, accounting for whether all flags
* (except `strictPropertyInitialization`) have been enabled by `strict: true`.
* @category Compiler Options
* @example
* ```ts
* const optionsLenient = {
* noImplicitAny: true,
* };
*
* isStrictCompilerOptionEnabled(optionsLenient, "noImplicitAny"); // true
* isStrictCompilerOptionEnabled(optionsLenient, "noImplicitThis"); // false
* ```
* @example
* ```ts
* const optionsStrict = {
* noImplicitThis: false,
* strict: true,
* };
*
* isStrictCompilerOptionEnabled(optionsStrict, "noImplicitAny"); // true
* isStrictCompilerOptionEnabled(optionsStrict, "noImplicitThis"); // false
* ```
*/
declare function isStrictCompilerOptionEnabled(options: ts.CompilerOptions, option: StrictCompilerOption): boolean;
/**
* Test if the given node has the given `ModifierFlags` set.
* @category Nodes - Flag Utilities
* @example
* ```ts
* declare const node: ts.Node;
*
* if (isModifierFlagSet(node, ts.ModifierFlags.Abstract)) {
* // ...
* }
* ```
*/
declare function isModifierFlagSet(node: ts.Declaration, flag: ts.ModifierFlags): boolean;
/**
* Test if the given node has the given `NodeFlags` set.
* @category Nodes - Flag Utilities
* @example
* ```ts
* declare const node: ts.Node;
*
* if (isNodeFlagSet(node, ts.NodeFlags.AwaitContext)) {
* // ...
* }
* ```
*/
declare const isNodeFlagSet: (node: ts.Node, flag: ts.NodeFlags) => boolean;
/**
* Test if the given node has the given `ObjectFlags` set.
* @category Nodes - Flag Utilities
* @example
* ```ts
* declare const node: ts.Node;
*
* if (isObjectFlagSet(node, ts.ObjectFlags.Anonymous)) {
* // ...
* }
* ```
*/
declare function isObjectFlagSet(objectType: ts.ObjectType, flag: ts.ObjectFlags): boolean;
/**
* Test if the given node has the given `SymbolFlags` set.
* @category Nodes - Flag Utilities
* @example
* ```ts
* declare const symbol: ts.Symbol;
*
* if (isSymbolFlagSet(symbol, ts.SymbolFlags.Accessor)) {
* // ...
* }
* ```
*/
declare const isSymbolFlagSet: (symbol: ts.Symbol, flag: ts.SymbolFlags) => boolean;
/**
* Test if the given node has the given `TypeFlags` set.
* @category Nodes - Flag Utilities
* @example
* ```ts
* declare const type: ts.Type;
*
* if (isTypeFlagSet(type, ts.TypeFlags.Any)) {
* // ...
* }
* ```
*/
declare const isTypeFlagSet: (type: ts.Type, flag: ts.TypeFlags) => boolean;
/**
* Test if the given iterable includes a modifier of any of the given kinds.
* @category Modifier Utilities
* @example
* ```ts
* declare const modifiers: ts.Modifier[];
*
* includesModifier(modifiers, ts.SyntaxKind.AbstractKeyword);
* ```
*/
declare function includesModifier(modifiers: Iterable<ts.ModifierLike> | undefined, ...kinds: ts.ModifierSyntaxKind[]): boolean;
/**
* What operations(s), if any, an expression applies.
*/
declare enum AccessKind {
None = 0,
Read = 1,
Write = 2,
Delete = 4,
ReadWrite = 3
}
/**
* Determines which operation(s), if any, an expression applies.
* @example
* ```ts
* declare const node: ts.Expression;
*
* if (getAccessKind(node).Write & AccessKind.Write) !== 0) {
* // this is a reassignment (write)
* }
* ```
*/
declare function getAccessKind(node: ts.Expression): AccessKind;
/**
* An `AssertionExpression` that is declared as const.
* @category Node Types
*/
type ConstAssertionExpression = ts.AssertionExpression & {
type: ts.TypeReferenceNode;
typeName: ConstAssertionIdentifier;
};
/**
* An `Identifier` with an `escapedText` value of `"const"`.
* @category Node Types
*/
type ConstAssertionIdentifier = ts.Identifier & {
escapedText: ts.__String & "const";
};
/**
* Test if a node is a {@link ConstAssertionExpression}.
* @category Nodes - Type Guards
* @example
* ```ts
* declare const node: ts.Node;
*
* if (isConstAssertionExpression(node)) {
* // ...
* }
* ```
* @returns Whether the given node appears to be a {@link ConstAssertionExpression}.
*/
declare function isConstAssertionExpression(node: ts.AssertionExpression): node is ConstAssertionExpression;
/**
* Test if a node is an `IterationStatement`.
* @category Nodes - Type Guards
* @example
* ```ts
* declare const node: ts.Node;
*
* if (isIterationStatement(node)) {
* // ...
* }
* ```
* @returns Whether the given node appears to be an `IterationStatement`.
*/
declare function isIterationStatement(node: ts.Node): node is ts.IterationStatement;
/**
* Test if a node is a `JSDocNamespaceDeclaration`.
* @category Nodes - Type Guards
* @example
* ```ts
* declare const node: ts.Node;
*
* if (isJSDocNamespaceDeclaration(node)) {
* // ...
* }
* ```
* @returns Whether the given node appears to be a `JSDocNamespaceDeclaration`.
*/
declare function isJSDocNamespaceDeclaration(node: ts.Node): node is ts.JSDocNamespaceDeclaration;
/**
* Test if a node is a `JsxTagNamePropertyAccess`.
* @category Nodes - Type Guards
* @example
* ```ts
* declare const node: ts.Node;
*
* if (isJsxTagNamePropertyAccess(node)) {
* // ...
* }
* ```
* @returns Whether the given node appears to be a `JsxTagNamePropertyAccess`.
*/
declare function isJsxTagNamePropertyAccess(node: ts.Node): node is ts.JsxTagNamePropertyAccess;
/**
* a `NamedDeclaration` that definitely has a name.
* @category Node Types
*/
interface NamedDeclarationWithName extends ts.NamedDeclaration {
name: ts.DeclarationName;
}
/**
* Test if a node is a {@link NamedDeclarationWithName}.
* @category Nodes - Type Guards
* @example
* ```ts
* declare const node: ts.Node;
*
* if (isNamedDeclarationWithName(node)) {
* // ...
* }
* ```
* @returns Whether the given node appears to be a {@link NamedDeclarationWithName}.
*/
declare function isNamedDeclarationWithName(node: ts.Declaration): node is NamedDeclarationWithName;
/**
* Test if a node is a `NamespaceDeclaration`.
* @category Nodes - Type Guards
* @example
* ```ts
* declare const node: ts.Node;
*
* if (isNamespaceDeclaration(node)) {
* // ...
* }
* ```
* @returns Whether the given node appears to be a `NamespaceDeclaration`.
*/
declare function isNamespaceDeclaration(node: ts.Node): node is ts.NamespaceDeclaration;
/**
* A number or string-like literal.
* @category Node Types
*/
type NumericOrStringLikeLiteral = ts.NumericLiteral | ts.StringLiteralLike;
/**
* Test if a node is a {@link NumericOrStringLikeLiteral}.
* @category Nodes - Type Guards
* @example
* ```ts
* declare const node: ts.Node;
*
* if (isNumericOrStringLikeLiteral(node)) {
* // ...
* }
* ```
* @returns Whether the given node appears to be a {@link NumericOrStringLikeLiteral}.
*/
declare function isNumericOrStringLikeLiteral(node: ts.Node): node is NumericOrStringLikeLiteral;
/**
* Test if a node is a `PropertyAccessEntityNameExpression`.
* @category Nodes - Type Guards
* @example
* ```ts
* declare const node: ts.Node;
*
* if (isPropertyAccessEntityNameExpression(node)) {
* // ...
* }
* ```
* @returns Whether the given node appears to be a `PropertyAccessEntityNameExpression`.
*/
declare function isPropertyAccessEntityNameExpression(node: ts.Node): node is ts.PropertyAccessEntityNameExpression;
/**
* Test if a node is a `SuperElementAccessExpression`.
* @category Nodes - Type Guards
* @example
* ```ts
* declare const node: ts.Node;
*
* if (isSuperElementAccessExpression(node)) {
* // ...
* }
* ```
* @returns Whether the given node appears to be a `SuperElementAccessExpression`.
*/
declare function isSuperElementAccessExpression(node: ts.Node): node is ts.SuperElementAccessExpression;
/**
* Test if a node is a `SuperPropertyAccessExpression`.
* @category Nodes - Type Guards
* @example
* ```ts
* declare const node: ts.Node;
*
* if (isSuperPropertyAccessExpression(node)) {
* // ...
* }
* ```
* @returns Whether the given node appears to be a `SuperPropertyAccessExpression`.
*/
declare function isSuperPropertyAccessExpression(node: ts.Node): node is ts.SuperPropertyAccessExpression;
/**
* A node that represents the any keyword.
* @category Node Types
*/
type AnyKeyword = ts.KeywordToken<ts.SyntaxKind.AnyKeyword>;
/**
* A node that represents the bigint keyword.
* @category Node Types
*/
type BigIntKeyword = ts.KeywordToken<ts.SyntaxKind.BigIntKeyword>;
/**
* A node that represents the boolean keyword.
* @category Node Types
*/
type BooleanKeyword = ts.KeywordToken<ts.SyntaxKind.BooleanKeyword>;
/**
* A node that represents the false keyword.
* @category Node Types
*/
type FalseKeyword = ts.KeywordToken<ts.SyntaxKind.FalseKeyword>;
/**
* A node that represents the import keyword.
* @category Node Types
*/
type ImportKeyword = ts.KeywordToken<ts.SyntaxKind.ImportKeyword>;
/**
* A node that represents the never keyword.
* @category Node Types
*/
type NeverKeyword = ts.KeywordToken<ts.SyntaxKind.NeverKeyword>;
/**
* A node that represents the null keyword.
* @category Node Types
*/
type NullKeyword = ts.KeywordToken<ts.SyntaxKind.NullKeyword>;
/**
* A node that represents the number keyword.
* @category Node Types
*/
type NumberKeyword = ts.KeywordToken<ts.SyntaxKind.NumberKeyword>;
/**
* A node that represents the object keyword.
* @category Node Types
*/
type ObjectKeyword = ts.KeywordToken<ts.SyntaxKind.ObjectKeyword>;
/**
* A node that represents the string keyword.
* @category Node Types
*/
type StringKeyword = ts.KeywordToken<ts.SyntaxKind.StringKeyword>;
/**
* A node that represents the super keyword.
* @category Node Types
*/
type SuperKeyword = ts.KeywordToken<ts.SyntaxKind.SuperKeyword>;
/**
* A node that represents the symbol keyword.
* @category Node Types
*/
type SymbolKeyword = ts.KeywordToken<ts.SyntaxKind.SymbolKeyword>;
/**
* A node that represents the this keyword.
* @category Node Types
*/
type ThisKeyword = ts.KeywordToken<ts.SyntaxKind.ThisKeyword>;
/**
* A node that represents the true keyword.
* @category Node Types
*/
type TrueKeyword = ts.KeywordToken<ts.SyntaxKind.TrueKeyword>;
/**
* A node that represents the undefined keyword.
* @category Node Types
*/
type UndefinedKeyword = ts.KeywordToken<ts.SyntaxKind.UndefinedKeyword>;
/**
* A node that represents the unknown keyword.
* @category Node Types
*/
type UnknownKeyword = ts.KeywordToken<ts.SyntaxKind.UnknownKeyword>;
/**
* A node that represents the void keyword.
* @category Node Types
*/
type VoidKeyword = ts.KeywordToken<ts.SyntaxKind.VoidKeyword>;
/**
* Test if a node is an `AbstractKeyword`.
* @category Nodes - Type Guards
* @example
* ```ts
* declare const node: ts.Node;
*
* if (isAbstractKeyword(node)) {
* // ...
* }
* ```
* @returns Whether the given node appears to be an `AbstractKeyword`.
*/
declare function isAbstractKeyword(node: ts.Node): node is ts.AbstractKeyword;
/**
* Test if a node is an `AccessorKeyword`.
* @category Nodes - Type Guards
* @example
* ```ts
* declare const node: ts.Node;
*
* if (isAccessorKeyword(node)) {
* // ...
* }
* ```
* @returns Whether the given node appears to be an `AccessorKeyword`.
*/
declare function isAccessorKeyword(node: ts.Node): node is ts.AccessorKeyword;
/**
* Test if a node is an {@link AnyKeyword}.
* @category Nodes - Type Guards
* @example
* ```ts
* declare const node: ts.Node;
*
* if (isAnyKeyword(node)) {
* // ...
* }
* ```
* @returns Whether the given node appears to be an {@link AnyKeyword}.
*/
declare function isAnyKeyword(node: ts.Node): node is AnyKeyword;
/**
* Test if a node is an `AssertKeyword`.
* @category Nodes - Type Guards
* @example
* ```ts
* declare const node: ts.Node;
*
* if (isAssertKeyword(node)) {
* // ...
* }
* ```
* @returns Whether the given node appears to be an `AssertKeyword`.
*/
declare function isAssertKeyword(node: ts.Node): node is ts.AssertKeyword;
/**
* Test if a node is an `AssertsKeyword`.
* @deprecated With TypeScript v5, in favor of typescript's `isAssertsKeyword`.
* @category Nodes - Type Guards
* @example
* ```ts
* declare const node: ts.Node;
*
* if (isAssertsKeyword(node)) {
* // ...
* }
* ```
* @returns Whether the given node appears to be an `AssertsKeyword`.
*/
declare function isAssertsKeyword(node: ts.Node): node is ts.AssertsKeyword;
/**
* Test if a node is an `AsyncKeyword`.
* @category Nodes - Type Guards
* @example
* ```ts
* declare const node: ts.Node;
*
* if (isAsyncKeyword(node)) {
* // ...
* }
* ```
* @returns Whether the given node appears to be an `AsyncKeyword`.
*/
declare function isAsyncKeyword(node: ts.Node): node is ts.AsyncKeyword;
/**
* Test if a node is an `AwaitKeyword`.
* @deprecated With TypeScript v5, in favor of typescript's `isAwaitKeyword`.
* @category Nodes - Type Guards
* @example
* ```ts
* declare const node: ts.Node;
*
* if (isAwaitKeyword(node)) {
* // ...
* }
* ```
* @returns Whether the given node appears to be an `AwaitKeyword`.
*/
declare function isAwaitKeyword(node: ts.Node): node is ts.AwaitKeyword;
/**
* Test if a node is a {@link BigIntKeyword}.
* @deprecated With TypeScript v5, in favor of typescript's `isBigIntKeyword`.
* @category Nodes - Type Guards
* @example
* ```ts
* declare const node: ts.Node;
*
* if (isBigIntKeyword(node)) {
* // ...
* }
* ```
* @returns Whether the given node appears to be a {@link BigIntKeyword}.
*/
declare function isBigIntKeyword(node: ts.Node): node is BigIntKeyword;
/**
* Test if a node is a {@link BooleanKeyword}.
* @deprecated With TypeScript v5, in favor of typescript's `isBooleanKeyword`.
* @category Nodes - Type Guards
* @example
* ```ts
* declare const node: ts.Node;
*
* if (isBooleanKeyword(node)) {
* // ...
* }
* ```
* @returns Whether the given node appears to be a {@link BooleanKeyword}.
*/
declare function isBooleanKeyword(node: ts.Node): node is BooleanKeyword;
/**
* Test if a node is a `ColonToken`.
* @deprecated With TypeScript v5, in favor of typescript's `isColonToken`.
* @category Nodes - Type Guards
* @example
* ```ts
* declare const node: ts.Node;
*
* if (isColonToken(node)) {
* // ...
* }
* ```
* @returns Whether the given node appears to be a `ColonToken`.
*/
declare function isColonToken(node: ts.Node): node is ts.ColonToken;
/**
* Test if a node is a `ConstKeyword`.
* @category Nodes - Type Guards
* @example
* ```ts
* declare const node: ts.Node;
*
* if (isConstKeyword(node)) {
* // ...
* }
* ```
* @returns Whether the given node appears to be a `ConstKeyword`.
*/
declare function isConstKeyword(node: ts.Node): node is ts.ConstKeyword;
/**
* Test if a node is a `DeclareKeyword`.
* @category Nodes - Type Guards
* @example
* ```ts
* declare const node: ts.Node;
*
* if (isDeclareKeyword(node)) {
* // ...
* }
* ```
* @returns Whether the given node appears to be a `DeclareKeyword`.
*/
declare function isDeclareKeyword(node: ts.Node): node is ts.DeclareKeyword;
/**
* Test if a node is a `DefaultKeyword`.
* @category Nodes - Type Guards
* @example
* ```ts
* declare const node: ts.Node;
*
* if (isDefaultKeyword(node)) {
* // ...
* }
* ```
* @returns Whether the given node appears to be a `DefaultKeyword`.
*/
declare function isDefaultKeyword(node: ts.Node): node is ts.DefaultKeyword;
/**
* Test if a node is a `DotToken`.
* @category Nodes - Type Guards
* @example
* ```ts
* declare const node: ts.Node;
*
* if (isDotToken(node)) {
* // ...
* }
* ```
* @returns Whether the given node appears to be a `DotToken`.
*/
declare function isDotToken(node: ts.Node): node is ts.DotToken;
/**
* Test if a node is an `EndOfFileToken`.
* @category Nodes - Type Guards
* @example
* ```ts
* declare const node: ts.Node;
*
* if (isEndOfFileToken(node)) {
* // ...
* }
* ```
* @returns Whether the given node appears to be an `EndOfFileToken`.
*/
declare function isEndOfFileToken(node: ts.Node): node is ts.EndOfFileToken;
/**
* Test if a node is an `EqualsGreaterThanToken`.
* @deprecated With TypeScript v5, in favor of typescript's `isEqualsGreaterThanToken`.
* @category Nodes - Type Guards
* @example
* ```ts
* declare const node: ts.Node;
*
* if (isEqualsGreaterThanToken(node)) {
* // ...
* }
* ```
* @returns Whether the given node appears to be an `EqualsGreaterThanToken`.
*/
declare function isEqualsGreaterThanToken(node: ts.Node): node is ts.EqualsGreaterThanToken;
/**
* Test if a node is an `EqualsToken`.
* @category Nodes - Type Guards
* @example
* ```ts
* declare const node: ts.Node;
*
* if (isEqualsToken(node)) {
* // ...
* }
* ```
* @returns Whether the given node appears to be an `EqualsToken`.
*/
declare function isEqualsToken(node: ts.Node): node is ts.EqualsToken;
/**
* Test if a node is an `ExclamationToken`.
* @deprecated With TypeScript v5, in favor of typescript's `isExclamationToken`.
* @category Nodes - Type Guards
* @example
* ```ts
* declare const node: ts.Node;
*
* if (isExclamationToken(node)) {
* // ...
* }
* ```
* @returns Whether the given node appears to be an `ExclamationToken`.
*/
declare function isExclamationToken(node: ts.Node): node is ts.ExclamationToken;
/**
* Test if a node is an `ExportKeyword`.
* @category Nodes - Type Guards
* @example
* ```ts
* declare const node: ts.Node;
*
* if (isExportKeyword(node)) {
* // ...
* }
* ```
* @returns Whether the given node appears to be an `ExportKeyword`.
*/
declare function isExportKeyword(node: ts.Node): node is ts.ExportKeyword;
/**
* Test if a node is a {@link FalseKeyword}.
* @category Nodes - Type Guards
* @example
* ```ts
* declare const node: ts.Node;
*
* if (isFalseKeyword(node)) {
* // ...
* }
* ```
* @returns Whether the given node appears to be a {@link FalseKeyword}.
*/
declare function isFalseKeyword(node: ts.Node): node is FalseKeyword;
/**
* Test if a node is a `FalseLiteral`.
* @category Nodes - Type Guards
* @example
* ```ts
* declare const node: ts.Node;
*
* if (isFalseLiteral(node)) {
* // ...
* }
* ```
* @returns Whether the given node appears to be a `FalseLiteral`.
*/
declare function isFalseLiteral(node: ts.Node): node is ts.FalseLiteral;
/**
* Test if a node is an `ImportExpression`.
* @category Nodes - Type Guards
* @example
* ```ts
* declare const node: ts.Node;
*
* if (isImportExpression(node)) {
* // ...
* }
* ```
* @returns Whether the given node appears to be an `ImportExpression`.
*/
declare function isImportExpression(node: ts.Node): node is ts.ImportExpression;
/**
* Test if a node is an {@link ImportKeyword}.
* @category Nodes - Type Guards
* @example
* ```ts
* declare const node: ts.Node;
*
* if (isImportKeyword(node)) {
* // ...
* }
* ```
* @returns Whether the given node appears to be an {@link ImportKeyword}.
*/
declare function isImportKeyword(node: ts.Node): node is ImportKeyword;
/**
* Test if a node is an `InKeyword`.
* @category Nodes - Type Guards
* @example
* ```ts
* declare const node: ts.Node;
*
* if (isInKeyword(node)) {
* // ...
* }
* ```
* @returns Whether the given node appears to be an `InKeyword`.
*/
declare function isInKeyword(node: ts.Node): node is ts.InKeyword;
/**
* Test if a node is an `InputFiles`.
* @deprecated With TypeScript v5
* @category Nodes - Type Guards
* @example
* ```ts
* declare const node: ts.Node;
*
* if (isInputFiles(node)) {
* // ...
* }
* ```
* @returns Whether the given node appears to be an `InputFiles`.
*/
declare function isInputFiles(node: ts.Node): node is ts.InputFiles;
/**
* Test if a node is a `JSDocText`.
* @category Nodes - Type Guards
* @example
* ```ts
* declare const node: ts.Node;
*
* if (isJSDocText(node)) {
* // ...
* }
* ```
* @returns Whether the given node appears to be a `JSDocText`.
*/
declare function isJSDocText(node: ts.Node): node is ts.JSDocText;
/**
* Test if a node is a `JsonMinusNumericLiteral`.
* @category Nodes - Type Guards
* @example
* ```ts
* declare const node: ts.Node;
*
* if (isJsonMinusNumericLiteral(node)) {
* // ...
* }
* ```
* @returns Whether the given node appears to be a `JsonMinusNumericLiteral`.
*/
declare function isJsonMinusNumericLiteral(node: ts.Node): node is ts.JsonMinusNumericLiteral;
/**
* Test if a node is a {@link NeverKeyword}.
* @category Nodes - Type Guards
* @example
* ```ts
* declare const node: ts.Node;
*
* if (isNeverKeyword(node)) {
* // ...
* }
* ```
* @returns Whether the given node appears to be a {@link NeverKeyword}.
*/
declare function isNeverKeyword(node: ts.Node): node is NeverKeyword;
/**
* Test if a node is a {@link NullKeyword}.
* @category Nodes - Type Guards
* @example
* ```ts
* declare const node: ts.Node;
*
* if (isNullKeyword(node)) {
* // ...
* }
* ```
* @returns Whether the given node appears to be a {@link NullKeyword}.
*/
declare function isNullKeyword(node: ts.Node): node is NullKeyword;
/**
* Test if a node is a `NullLiteral`.
* @category Nodes - Type Guards
* @example
* ```ts
* declare const node: ts.Node;
*
* if (isNullLiteral(node)) {
* // ...
* }
* ```
* @returns Whether the given node appears to be a `NullLiteral`.
*/
declare function isNullLiteral(node: ts.Node): node is ts.NullLiteral;
/**
* Test if a node is a {@link NumberKeyword}.
* @category Nodes - Type Guards
* @example
* ```ts
* declare const node: ts.Node;
*
* if (isNumberKeyword(node)) {
* // ...
* }
* ```
* @returns Whether the given node appears to be a {@link NumberKeyword}.
*/
declare function isNumberKeyword(node: ts.Node): node is NumberKeyword;
/**
* Test if a node is an {@link ObjectKeyword}.
* @category Nodes - Type Guards
* @example
* ```ts
* declare const node: ts.Node;
*
* if (isObjectKeyword(node)) {
* // ...
* }
* ```
* @returns Whether the given node appears to be an {@link ObjectKeyword}.
*/
declare function isObjectKeyword(node: ts.Node): node is ObjectKeyword;
/**
* Test if a node is an `OutKeyword`.
* @category Nodes - Type Guards
* @example
* ```ts
* declare const node: ts.Node;
*
* if (isOutKeyword(node)) {
* // ...
* }
* ```
* @returns Whether the given node appears to be an `OutKeyword`.
*/
declare function isOutKeyword(node: ts.Node): node is ts.OutKeyword;
/**
* Test if a node is an `OverrideKeyword`.
* @category Nodes - Type Guards
* @example
* ```ts
* declare const node: ts.Node;
*
* if (isOverrideKeyword(node)) {
* // ...
* }
* ```
* @returns Whether the given node appears to be an `OverrideKeyword`.
*/
declare function isOverrideKeyword(node: ts.Node): node is ts.OverrideKeyword;
/**
* Test if a node is a `PrivateKeyword`.
* @category Nodes - Type Guards
* @example
* ```ts
* declare const node: ts.Node;
*
* if (isPrivateKeyword(node)) {
* // ...
* }
* ```
* @returns Whether the given node appears to be a `PrivateKeyword`.
*/
declare function isPrivateKeyword(node: ts.Node): node is ts.PrivateKeyword;
/**
* Test if a node is a `ProtectedKeyword`.
* @category Nodes - Type Guards
* @example
* ```ts
* declare const node: ts.Node;
*
* if (isProtectedKeyword(node)) {
* // ...
* }
* ```
* @returns Whether the given node appears to be a `ProtectedKeyword`.
*/
declare function isProtectedKeyword(node: ts.Node): node is ts.ProtectedKeyword;
/**
* Test if a node is a `PublicKeyword`.
* @category Nodes - Type Guards
* @example
* ```ts
* declare const node: ts.Node;
*
* if (isPublicKeyword(node)) {
* // ...
* }
* ```
* @returns Whether the given node appears to be a `PublicKeyword`.
*/
declare function isPublicKeyword(node: ts.Node): node is ts.PublicKeyword;
/**
* Test if a node is a `QuestionDotToken`.
* @deprecated With TypeScript v5, in favor of typescript's `isQuestionDotToken`.
* @category Nodes - Type Guards
* @example
* ```ts
* declare const node: ts.Node;
*
* if (isQuestionDotToken(node)) {
* // ...
* }
* ```
* @returns Whether the given node appears to be a `QuestionDotToken`.
*/
declare function isQuestionDotToken(node: ts.Node): node is ts.QuestionDotToken;
/**
* Test if a node is a `QuestionToken`.
* @deprecated With TypeScript v5, in favor of typescript's `isQuestionToken`.
* @category Nodes - Type Guards
* @example
* ```ts
* declare const node: ts.Node;
*
* if (isQuestionToken(node)) {
* // ...
* }
* ```
* @returns Whether the given node appears to be a `QuestionToken`.
*/
declare function isQuestionToken(node: ts.Node): node is ts.QuestionToken;
/**
* Test if a node is a `ReadonlyKeyword`.
* @category Nodes - Type Guards
* @example
* ```ts
* declare const node: ts.Node;
*
* if (isReadonlyKeyword(node)) {
* // ...
* }
* ```
* @returns Whether the given node appears to be a `ReadonlyKeyword`.
*/
declare function isReadonlyKeyword(node: ts.Node): node is ts.ReadonlyKeyword;
/**
* Test if a node is a `StaticKeyword`.
* @category Nodes - Type Guards
* @example
* ```ts
* declare const node: ts.Node;
*
* if (isStaticKeyword(node)) {
* // ...
* }
* ```
* @returns Whether the given node appears to be a `StaticKeyword`.
*/
declare function isStaticKeyword(node: ts.Node): node is ts.StaticKeyword;
/**
* Test if a node is a {@link StringKeyword}.
* @category Nodes - Type Guards
* @example
* ```ts
* declare const node: ts.Node;
*
* if (isStringKeyword(node)) {
* // ...
* }
* ```
* @returns Whether the given node appears to be a {@link StringKeyword}.
*/
declare function isStringKeyword(node: ts.Node): node is StringKeyword;
/**
* Test if a node is a `SuperExpression`.
* @category Nodes - Type Guards
* @example
* ```ts
* declare const node: ts.Node;
*
* if (isSuperExpression(node)) {
* // ...
* }
* ```
* @returns Whether the given node appears to be a `SuperExpression`.
*/
declare function isSuperExpression(node: ts.Node): node is ts.SuperExpression;
/**
* Test if a node is a {@link SuperKeyword}.
* @category Nodes - Type Guards
* @example
* ```ts
* declare const node: ts.Node;
*
* if (isSuperKeyword(node)) {
* // ...
* }
* ```
* @returns Whether the given node appears to be a {@link SuperKeyword}.
*/
declare function isSuperKeyword(node: ts.Node): node is SuperKeyword;
/**
* Test if a node is a {@link SymbolKeyword}.
* @category Nodes - Type Guards
* @example
* ```ts
* declare const node: ts.Node;
*
* if (isSymbolKeyword(node)) {
* // ...
* }
* ```
* @returns Whether the given node appears to be a {@link SymbolKeyword}.
*/
declare function isSymbolKeyword(node: ts.Node): node is SymbolKeyword;
/**
* Test if a node is a `SyntaxList`.
* @category Nodes - Type Guards
* @example
* ```ts
* declare const node: ts.Node;
*
* if (isSyntaxList(node)) {
* // ...
* }
* ```
* @returns Whether the given node appears to be a `SyntaxList`.
*/
declare function isSyntaxList(node: ts.Node): node is ts.SyntaxList;
/**
* Test if a node is a `ThisExpression`.
* @category Nodes - Type Guards
* @example
* ```ts
* declare const node: ts.Node;
*
* if (isThisExpression(node)) {
* // ...
* }
* ```
* @returns Whether the given node appears to be a `ThisExpression`.
*/
declare function isThisExpression(node: ts.Node): node is ts.ThisExpression;
/**
* Test if a node is a {@link ThisKeyword}.
* @category Nodes - Type Guards
* @example
* ```ts
* declare const node: ts.Node;
*
* if (isThisKeyword(node)) {
* // ...
* }
* ```
* @returns Whether the given node appears to be a {@link ThisKeyword}.
*/
declare function isThisKeyword(node: ts.Node): node is ThisKeyword;
/**
* Test if a node is a {@link TrueKeyword}.
* @category Nodes - Type Guards
* @example
* ```ts
* declare const node: ts.Node;
*
* if (isTrueKeyword(node)) {
* // ...
* }
* ```
* @returns Whether the given node appears to be a {@link TrueKeyword}.
*/
declare function isTrueKeyword(node: ts.Node): node is TrueKeyword;
/**
* Test if a node is a `TrueLiteral`.
* @category Nodes - Type Guards
* @example
* ```ts
* declare const node: ts.Node;
*
* if (isTrueLiteral(node)) {
* // ...
* }
* ```
* @returns Whether the given node appears to be a `TrueLiteral`.
*/
declare function isTrueLiteral(node: ts.Node): node is ts.TrueLiteral;
/**
* Test if a node is an {@link UndefinedKeyword}.
* @category Nodes - Type Guards
* @example
* ```ts
* declare const node: ts.Node;
*
* if (isUndefinedKeyword(node)) {
* // ...
* }
* ```
* @returns Whether the given node appears to be an {@link UndefinedKeyword}.
*/
declare function isUndefinedKeyword(node: ts.Node): node is UndefinedKeyword;
/**
* Test if a node is an {@link UnknownKeyword}.
* @category Nodes - Type Guards
* @example
* ```ts
* declare const node: ts.Node;
*
* if (isUnknownKeyword(node)) {
* // ...
* }
* ```
* @returns Whether the given node appears to be an {@link UnknownKeyword}.
*/
declare function isUnknownKeyword(node: ts.Node): node is UnknownKeyword;
/**
* Test if a node is an `UnparsedPrologue`.
* @deprecated With TypeScript v5
* @category Nodes - Type Guards
* @example
* ```ts
* declare const node: ts.Node;
*
* if (isUnparsedPrologue(node)) {
* // ...
* }
* ```
* @returns Whether the given node appears to be an `UnparsedPrologue`.
*/
declare function isUnparsedPrologue(node: ts.Node): node is ts.UnparsedPrologue;
/**
* Test if a node is an `UnparsedSyntheticReference`.
* @deprecated With TypeScript v5
* @category Nodes - Type Guards
* @example
* ```ts
* declare const node: ts.Node;
*
* if (isUnparsedSyntheticReference(node)) {
* // ...
* }
* ```
* @returns Whether the given node appears to be an `UnparsedSyntheticReference`.
*/
declare function isUnparsedSyntheticReference(node: ts.Node): node is ts.UnparsedSyntheticReference;
/**
* Test if a node is a {@link VoidKeyword}.
* @category Nodes - Type Guards
* @example
* ```ts
* declare const node: ts.Node;
*
* if (isVoidKeyword(node)) {
* // ...
* }
* ```
* @returns Whether the given node appears to be a {@link VoidKeyword}.
*/
declare function isVoidKeyword(node: ts.Node): node is VoidKeyword;
/**
* Test if a node is an `AccessExpression`.
* @category Nodes - Type Guards
* @example
* ```ts
* declare const node: ts.Node;
*
* if (isAccessExpression(node)) {
* // ...
* }
* ```
* @returns Whether the given node appears to be an `AccessExpression`.
*/
declare function isAccessExpression(node: ts.Node): node is ts.AccessExpression;
/**
* Test if a node is an `AccessibilityModifier`.
* @category Nodes - Type Guards
* @example
* ```ts
* declare const node: ts.Node;
*
* if (isAccessibilityModifier(node)) {
* // ...
* }
* ```
* @returns Whether the given node appears to be an `AccessibilityModifier`.
*/
declare function isAccessibilityModifier(node: ts.Node): node is ts.AccessibilityModifier;
/**
* Test if a node is an `AccessorDeclaration`.
* @deprecated With TypeScript v5, in favor of typescript's `isAccessor`.
* @category Nodes - Type Guards
* @example
* ```ts
* declare const node: ts.Node;
*
* if (isAccessorDeclaration(node)) {
* // ...
* }
* ```
* @returns Whether the given node appears to be an `AccessorDeclaration`.
*/
declare function isAccessorDeclaration(node: ts.Node): node is ts.AccessorDeclaration;
/**
* Test if a node is an `ArrayBindingElement`.
* @deprecated With TypeScript v5, in favor of typescript's `isArrayBindingElement`.
* @category Nodes - Type Guards
* @example
* ```ts
* declare const node: ts.Node;
*
* if (isArrayBindingElement(node)) {
* // ...
* }
* ```
* @returns Whether the given node appears to be an `ArrayBindingElement`.
*/
declare function isArrayBindingElement(node: ts.Node): node is ts.ArrayBindingElement;
/**
* Test if a node is an `ArrayBindingOrAssignmentPattern`.
* @category Nodes - Type Guards
* @example
* ```ts
* declare const node: ts.Node;
*
* if (isArrayBindingOrAssignmentPattern(node)) {
* // ...
* }
* ```
* @returns Whether the given node appears to be an `ArrayBindingOrAssignmentPattern`.
*/
declare function isArrayBindingOrAssignmentPattern(node: ts.Node): node is ts.ArrayBindingOrAssignmentPattern;
/**
* Test if a node is an `AssignmentPattern`.
* @category Nodes - Type Guards
* @example
* ```ts
* declare const node: ts.Node;
*
* if (isAssignmentPattern(node)) {
* // ...
* }
* ```
* @returns Whether the given node appears to be an `AssignmentPattern`.
*/
declare function isAssignmentPattern(node: ts.Node): node is ts.AssignmentPattern;
/**
* Test if a node is a `BindingOrAssignmentElementRestIndicator`.
* @category Nodes - Type Guards
* @example
* ```ts
* declare const node: ts.Node;
*
* if (isBindingOrAssignmentElementRestIndicator(node)) {
* // ...
* }
* ```
* @returns Whether the given node appears to be a `BindingOrAssignmentElementRestIndicator`.
*/
declare function isBindingOrAssignmentElementRestIndicator(node: ts.Node): node is ts.BindingOrAssignmentElementRestIndicator;
/**
* Test if a node is a `BindingOrAssignmentElementTarget`.
* @category Nodes - Type Guards
* @example
* ```ts
* declare const node: ts.Node;
*
* if (isBindingOrAssignmentElementTarget(node)) {
* // ...
* }
* ```
* @returns Whether the given node appears to be a `BindingOrAssignmentElementTarget`.
*/
declare function isBindingOrAssignmentElementTarget(node: ts.Node): node is ts.BindingOrAssignmentElementTarget;
/**
* Test if a node is a `BindingOrAssignmentPattern`.
* @category Nodes - Type Guards
* @example
* ```ts
* declare const node: ts.Node;
*
* if (isBindingOrAssignmentPattern(node)) {
* // ...
* }
* ```
* @returns Whether the given node appears to be a `BindingOrAssignmentPattern`.
*/
declare function isBindingOrAssignmentPattern(node: ts.Node): node is ts.BindingOrAssignmentPattern;
/**
* Test if a node is a `BindingPattern`.
* @category Nodes - Type Guards
* @example
* ```ts
* declare const node: ts.Node;
*
* if (isBindingPattern(node)) {
* // ...
* }
* ```
* @returns Whether the given node appears to be a `BindingPattern`.
*/
declare function isBindingPattern(node: ts.Node): node is ts.BindingPattern;
/**
* Test if a node is a `BlockLike`.
* @category Nodes - Type Guards
* @example
* ```ts
* declare const node: ts.Node;
*
* if (isBlockLike(node)) {
* // ...
* }
* ```
* @returns Whether the given node appears to be a `BlockLike`.
*/
declare function isBlockLike(node: ts.Node): node is ts.BlockLike;
/**
* Test if a node is a `BooleanLiteral`.
* @category Nodes - Type Guards
* @example
* ```ts
* declare const node: ts.Node;
*
* if (isBooleanLiteral(node)) {
* // ...
* }
* ```
* @returns Whether the given node appears to be a `BooleanLiteral`.
*/
declare function isBooleanLiteral(node: ts.Node): node is ts.BooleanLiteral;
/**
* Test if a node is a `ClassLikeDeclaration`.
* @deprecated With TypeScript v5, in favor of typescript's `isClassLike`.
* @category Nodes - Type Guards
* @example
* ```ts
* declare const node: ts.Node;
*
* if (isClassLikeDeclaration(node)) {
* // ...
* }
* ```
* @returns Whether the given node appears to be a `ClassLikeDeclaration`.
*/
declare function isClassLikeDeclaration(node: ts.Node): node is ts.ClassLikeDeclaration;
/**
* Test if a node is a `ClassMemberModifier`.
* @category Nodes - Type Guards
* @example
* ```ts
* declare const node: ts.Node;
*
* if (isClassMemberModifier(node)) {
* // ...
* }
* ```
* @returns Whether the given node appears to be a `ClassMemberModifier`.
*/
declare function isClassMemberModifier(node: ts.Node): node is ts.ClassMemberModifier;
/**
* Test if a node is a `DeclarationName`.
* @category Nodes - Type Guards
* @example
* ```ts
* declare const node: ts.Node;
*
* if (isDeclarationName(node)) {
* // ...
* }
* ```
* @returns Whether the given node appears to be a `DeclarationName`.
*/
declare function isDeclarationName(node: ts.Node): node is ts.DeclarationName;
/**
* Test if a node is a `DeclarationWithTypeParameterChildren`.
* @category Nodes - Type Guards
* @example
* ```ts
* declare const node: ts.Node;
*
* if (isDeclarationWithTypeParameterChildren(node)) {
* // ...
* }
* ```
* @returns Whether the given node appears to be a `DeclarationWithTypeParameterChildren`.
*/
declare function isDeclarationWithTypeParameterChildren(node: ts.Node): node is ts.DeclarationWithTypeParameterChildren;
/**
* Test if a node is a `DeclarationWithTypeParameters`.
* @category Nodes - Type Guards
* @example
* ```ts
* declare const node: ts.Node;
*
* if (isDeclarationWithTypeParameters(node)) {
* // ...
* }
* ```
* @returns Whether the given node appears to be a `DeclarationWithTypeParameters`.
*/
declare function isDeclarationWithTypeParameters(node: ts.Node): node is ts.DeclarationWithTypeParameters;
/**
* Test if a node is a `DestructuringPattern`.
* @category Nodes - Type Guards
* @example
* ```ts
* declare const node: ts.Node;
*
* if (isDestructuringPattern(node)) {
* // ...
* }
* ```
* @returns Whether the given node appears to be a `DestructuringPattern`.
*/
declare function isDestructuringPattern(node: ts.Node): node is ts.DestructuringPattern;
/**
* Test if a node is an `EntityNameExpression`.
* @category Nodes - Type Guards
* @example
* ```ts
* declare const node: ts.Node;
*
* if (isEntityNameExpression(node)) {
* // ...
* }
* ```
* @returns Whether the given node appears to be an `EntityNameExpression`.
*/
declare function isEntityNameExpression(node: ts.Node): node is ts.EntityNameExpression;
/**
* Test if a node is an `EntityNameOrEntityNameExpression`.
* @category Nodes - Type Guards
* @example
* ```ts
* declare const node: ts.Node;
*
* if (isEntityNameOrEntityNameExpression(node)) {
* // ...
* }
* ```
* @returns Whether the given node appears to be an `EntityNameOrEntityNameExpression`.
*/
declare function isEntityNameOrEntityNameExpression(node: ts.Node): node is ts.EntityNameOrEntityNameExpression;
/**
* Test if a node is a `ForInOrOfStatement`.
* @category Nodes - Type Guards
* @example
* ```ts
* declare const node: ts.Node;
*
* if (isForInOrOfStatement(node)) {
* // ...
* }
* ```
* @returns Whether the given node appears to be a `ForInOrOfStatement`.
*/
declare function isForInOrOfStatement(node: ts.Node): node is ts.ForInOrOfStatement;
/**
* Test if a node is a `FunctionLikeDeclaration`.
* @deprecated With TypeScript v5, in favor of typescript's `isFunctionLike`.
* @category Nodes - Type Guards
* @example
* ```ts
* declare const node: ts.Node;
*
* if (isFunctionLikeDeclaration(node)) {
* // ...
* }
* ```
* @returns Whether the given node appears to be a `FunctionLikeDeclaration`.
*/
declare function isFunctionLikeDeclaration(node: ts.Node): node is ts.FunctionLikeDeclaration;
/**
* Test if a node is a `HasDecorators`.
* @category Nodes - Type Guards
* @example
* ```ts
* declare const node: ts.Node;
*
* if (hasDecorators(node)) {
* // ...
* }
* ```
* @returns Whether the given node appears to be a `HasDecorators`.
*/
declare function hasDecorators(node: ts.Node): node is ts.HasDecorators;
/**
* Test if a node is a `HasExpressionInitializer`.
* @category Nodes - Type Guards
* @example
* ```ts
* declare const node: ts.Node;
*
* if (hasExpressionInitializer(node)) {
* // ...
* }
* ```
* @returns Whether the given node appears to be a `HasExpressionInitializer`.
*/
declare function hasExpressionInitializer(node: ts.Node): node is ts.HasExpressionInitializer;
/**
* Test if a node is a `HasInitializer`.
* @category Nodes - Type Guards
* @example
* ```ts
* declare const node: ts.Node;
*
* if (hasInitializer(node)) {
* // ...
* }
* ```
* @returns Whether the given node appears to be a `HasInitializer`.
*/
declare function hasInitializer(node: ts.Node): node is ts.HasInitializer;
/**
* Test if a node is a `HasJSDoc`.
* @category Nodes - Type Guards
* @example
* ```ts
* declare const node: ts.Node;
*
* if (hasJSDoc(node)) {
* // ...
* }
* ```
* @returns Whether the given node appears to be a `HasJSDoc`.
*/
declare function hasJSDoc(node: ts.Node): node is ts.HasJSDoc;
/**
* Test if a node is a `HasModifiers`.
* @category Nodes - Type Guards
* @example
* ```ts
* declare const node: ts.Node;
*
* if (hasModifiers(node)) {
* // ...
* }
* ```
* @returns Whether the given node appears to be a `HasModifiers`.
*/
declare function hasModifiers(node: ts.Node): node is ts.HasModifiers;
/**
* Test if a node is a `HasType`.
* @category Nodes - Type Guards
* @example
* ```ts
* declare const node: ts.Node;
*
* if (hasType(node)) {
* // ...
* }
* ```
* @returns Whether the given node appears to be a `HasType`.
*/
declare function hasType(node: ts.Node): node is ts.HasType;
/**
* Test if a node is a `HasTypeArguments`.
* @category Nodes - Type Guards
* @example
* ```ts
* declare const node: ts.Node;
*
* if (hasTypeArguments(node)) {
* // ...
* }
* ```
* @returns Whether the given node appears to be a `HasTypeArguments`.
*/
declare function hasTypeArguments(node: ts.Node): node is ts.HasTypeArguments;
/**
* Test if a node is a `JSDocComment`.
* @category Nodes - Type Guards
* @example
* ```ts
* declare const node: ts.Node;
*
* if (isJSDocComment(node)) {
* // ...
* }
* ```
* @returns Whether the given node appears to be a `JSDocComment`.
*/
declare function isJSDocComment(node: ts.Node): node is ts.JSDocComment;
/**
* Test if a node is a `JSDocNamespaceBody`.
* @category Nodes - Type Guards
* @example
* ```ts
* declare const node: ts.Node;
*
* if (isJSDocNamespaceBody(node)) {
* // ...
* }
* ```
* @returns Whether the given node appears to be a `JSDocNamespaceBody`.
*/
declare function isJSDocNamespaceBody(node: ts.Node): node is ts.JSDocNamespaceBody;
/**
* Test if a node is a `JSDocTypeReferencingNode`.
* @category Nodes - Type Guards
* @example
* ```ts
* declare const node: ts.Node;
*
* if (isJSDocTypeReferencingNode(node)) {
* // ...
* }
* ```
* @returns Whether the given node appears to be a `JSDocTypeReferencingNode`.
*/
declare function isJSDocTypeReferencingNode(node: ts.Node): node is ts.JSDocTypeReferencingNode;
/**
* Test if a node is a `JsonObjectExpression`.
* @category Nodes - Type Guards
* @example
* ```ts
* declare const node: ts.Node;
*
* if (isJsonObjectExpression(node)) {
* // ...
* }
* ```
* @returns Whether the given node appears to be a `JsonObjectExpression`.
*/
declare function isJsonObjectExpression(node: ts.Node): node is ts.JsonObjectExpression;
/**
* Test if a node is a `JsxAttributeLike`.
* @deprecated With TypeScript v5, in favor of typescript's `isJsxAttributeLike`.
* @category Nodes - Type Guards
* @example
* ```ts
* declare const node: ts.Node;
*
* if (isJsxAttributeLike(node)) {
* // ...
* }
* ```
* @returns Whether the given node appears to be a `JsxAttributeLike`.
*/
declare function isJsxAttributeLike(node: ts.Node): node is ts.JsxAttributeLike;
/**
* Test if a node is a `JsxAttributeValue`.
* @category Nodes - Type Guards
* @example
* ```ts
* declare const node: ts.Node;
*
* if (isJsxAttributeValue(node)) {
* // ...
* }
* ```
* @returns Whether the given node appears to be a `JsxAttributeValue`.
*/
declare function isJsxAttributeValue(node: ts.Node): node is ts.JsxAttributeValue;
/**
* Test if a node is a `JsxChild`.
* @deprecated With TypeScript v5, in favor of typescript's `isJsxChild`.
* @category Nodes - Type Guards
* @example
* ```ts
* declare const node: ts.Node;
*
* if (isJsxChild(node)) {
* // ...
* }
* ```
* @returns Whether the given node appears to be a `JsxChild`.
*/
declare function isJsxChild(node: ts.Node): node is ts.JsxChild;
/**
* Test if a node is a `JsxTagNameExpression`.
* @deprecated With TypeScript v5, in favor of typescript's `isJsxTagNameExpression`.
* @category Nodes - Type Guards
* @example
* ```ts
* declare const node: ts.Node;
*
* if (isJsxTagNameExpression(node)) {
* // ...
* }
* ```
* @returns Whether the given node appears to be a `JsxTagNameExpression`.
*/
declare function isJsxTagNameExpression(node: ts.Node): node is ts.JsxTagNameExpression;
/**
* Test if a node is a `LiteralToken`.
* @category Nodes - Type Guards
* @example
* ```ts
* declare const node: ts.Node;
*
* if (isLiteralToken(node)) {
* // ...
* }
* ```
* @returns Whether the given node appears to be a `LiteralToken`.
*/
declare function isLiteralToken(node: ts.Node): node is ts.LiteralToken;
/**
* Test if a node is a `ModuleBody`.
* @deprecated With TypeScript v5, in favor of typescript's `isModuleBody`.
* @category Nodes - Type Guards
* @example
* ```ts
* declare const node: ts.Node;
*
* if (isModuleBody(node)) {
* // ...
* }
* ```
* @returns Whether the given node appears to be a `ModuleBody`.
*/
declare function isModuleBody(node: ts.Node): node is ts.ModuleBody;
/**
* Test if a node is a `ModuleName`.
* @deprecated With TypeScript v5, in favor of typescript's `isModuleName`.
* @category Nodes - Type Guards
* @example
* ```ts
* declare const node: ts.Node;
*
* if (isModuleName(node)) {
* // ...
* }
* ```
* @returns Whether the given node appears to be a `ModuleName`.
*/
declare function isModuleName(node: ts.Node): node is ts.ModuleName;
/**
* Test if a node is a `ModuleReference`.
* @deprecated With TypeScript v5, in favor of typescript's `isModuleReference`.
* @category Nodes - Type Guards
* @example
* ```ts
* declare const node: ts.Node;
*
* if (isModuleReference(node)) {
* // ...
* }
* ```
* @returns Whether the given node appears to be a `ModuleReference`.
*/
declare function isModuleReference(node: ts.Node): node is ts.ModuleReference;
/**
* Test if a node is a `NamedImportBindings`.
* @deprecated With TypeScript v5, in favor of typescript's `isNamedImportBindings`.
* @category Nodes - Type Guards
* @example
* ```ts
* declare const node: ts.Node;
*
* if (isNamedImportBindings(node)) {
* // ...
* }
* ```
* @returns Whether the given node appears to be a `NamedImportBindings`.
*/
declare function isNamedImportBindings(node: ts.Node): node is ts.NamedImportBindings;
/**
* Test if a node is a `NamedImportsOrExports`.
* @category Nodes - Type Guards
* @example
* ```ts
* declare const node: ts.Node;
*
* if (isNamedImportsOrExports(node)) {
* // ...
* }
* ```
* @returns Whether the given node appears to be a `NamedImportsOrExports`.
*/
declare function isNamedImportsOrExports(node: ts.Node): node is ts.NamedImportsOrExports;
/**
* Test if a node is a `NamespaceBody`.
* @category Nodes - Type Guards
* @example
* ```ts
* declare const node: ts.Node;
*
* if (isNamespaceBody(node)) {
* // ...
* }
* ```
* @returns Whether the given node appears to be a `NamespaceBody`.
*/
declare function isNamespaceBody(node: ts.Node): node is ts.NamespaceBody;
/**
* Test if a node is an `ObjectBindingOrAssignmentElement`.
* @category Nodes - Type Guards
* @example
* ```ts
* declare const node: ts.Node;
*
* if (isObjectBindingOrAssignmentElement(node)) {
* // ...
* }
* ```
* @returns Whether the given node appears to be an `ObjectBindingOrAssignmentElement`.
*/
declare function isObjectBindingOrAssignmentElement(node: ts.Node): node is ts.ObjectBindingOrAssignmentElement;
/**
* Test if a node is an `ObjectBindingOrAssignmentPattern`.
* @category Nodes - Type Guards
* @example
* ```ts
* declare const node: ts.Node;
*
* if (isObjectBindingOrAssignmentPattern(node)) {
* // ...
* }
* ```
* @returns Whether the given node appears to be an `ObjectBindingOrAssignmentPattern`.
*/
declare function isObjectBindingOrAssignmentPattern(node: ts.Node): node is ts.ObjectBindingOrAssignmentPattern;
/**
* Test if a node is an `ObjectTypeDeclaration`.
* @category Nodes - Type Guards
* @example
* ```ts
* declare const node: ts.Node;
*
* if (isObjectTypeDeclaration(node)) {
* // ...
* }
* ```
* @returns Whether the given node appears to be an `Obje