Module

x/ts_morph/ts_morph.d.ts>ForStatement

TypeScript Compiler API wrapper for static analysis and programmatic code changes.
Very Popular
Go to Latest
class ForStatement
extends ForStatementBase<ts.ForStatement>
import { ForStatement } from "https://dotland.deno.dev/x/ts_morph@18.0.0/ts_morph.d.ts";

Methods

getCondition(): Expression | undefined

Gets this for statement's condition or undefined if none exists.

getConditionOrThrow(message?: string | (() => string)): Expression<ts.Expression>

Gets this for statement's condition or throws if none exists.

getIncrementor(): Expression | undefined

Gets this for statement's incrementor.

getIncrementorOrThrow(message?: string | (() => string)): Expression<ts.Expression>

Gets this for statement's incrementor or throws if none exists.

Gets this for statement's initializer or undefined if none exists.

getInitializerOrThrow(message?: string | (() => string)): Expression<ts.Expression> | VariableDeclarationList

Gets this for statement's initializer or throws if none exists.

getParent(): NodeParentType<ts.ForStatement>
getParentOrThrow(message?: string | (() => string)): NonNullable<NodeParentType<ts.ForStatement>>