Skip to main content
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://deno.land/x/ts_morph@15.1.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(): Expression

Gets the initializer or throw.

function InitializerExpressionGetableNode
import { InitializerExpressionGetableNode } from "https://deno.land/x/ts_morph@15.1.0/mod.ts";

Type Parameters

T extends Constructor<InitializerExpressionGetableNodeExtensionType>