Module

x/ts_morph/ts_morph.d.ts>SwitchStatement

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

Methods

Gets this switch statement's case block.

Gets the switch statement's case block's clauses.

getParent(): NodeParentType<ts.SwitchStatement>
getParentOrThrow(message?: string | (() => string)): NonNullable<NodeParentType<ts.SwitchStatement>>
removeClause(index: number): CaseBlock

Removes the specified clause based on the provided index.

removeClauses(indexRange: [number, number]): CaseBlock

Removes the specified clauses based on the provided index range.