Module

x/ts_morph/mod.ts>InitializerExpressionGetableNode

TypeScript Compiler API wrapper for static analysis and programmatic code changes.
Very Popular
Go to Latest
interface InitializerExpressionGetableNode
import { type InitializerExpressionGetableNode } from "https://dotland.deno.dev/x/ts_morph@17.0.0/mod.ts";

Methods

hasInitializer(): boolean

Gets if node has an initializer.

getInitializer(): Expression | undefined

Gets the initializer.

getInitializerIfKindOrThrow<TKind extends SyntaxKind>(kind: TKind): KindToExpressionMappings[TKind]

Gets the initializer if it's a certain kind or throws.

getInitializerIfKind<TKind extends SyntaxKind>(kind: TKind): KindToExpressionMappings[TKind] | undefined

Gets the initializer if it's a certain kind.

getInitializerOrThrow(message?: string | (() => string)): Expression

Gets the initializer or throw.

function InitializerExpressionGetableNode
import { InitializerExpressionGetableNode } from "https://dotland.deno.dev/x/ts_morph@17.0.0/mod.ts";

Type Parameters

T extends Constructor<InitializerExpressionGetableNodeExtensionType>

Returns

Constructor<InitializerExpressionGetableNode> & T