Module

x/ts_morph/mod.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@16.0.0/mod.ts";

Methods

Gets this switch statement's case block.

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

getParent(): NodeParentType<ts.SwitchStatement>
getParentOrThrow(): 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.