Module

x/ts_morph/mod.ts>BaseExpressionedNode

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

Type Parameters

TExpression extends Node

Methods

getExpression(): TExpression

Gets the expression.

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

Gets the expression if its of a certain kind or returns undefined.

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

Gets the expression if its of a certain kind or throws.

setExpression(textOrWriterFunction: string | WriterFunction): this

Sets the expression.

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

Type Parameters

T extends Constructor<ExpressionedNodeExtensionType>
optional
TExpression extends Node = CompilerNodeToWrappedType<InstanceOf<T>["compilerNode"]>

Returns

Constructor<BaseExpressionedNode<TExpression>> & T