Module

x/ts_morph/ts_morph.d.ts>Node#getParentIfOrThrow

TypeScript Compiler API wrapper for static analysis and programmatic code changes.
Very Popular
Latest
method Node.prototype.getParentIfOrThrow
import { Node } from "https://dotland.deno.dev/x/ts_morph@22.0.0/ts_morph.d.ts";

Gets the parent if it matches a certain condition or throws.

Parameters

condition: (parent: Node | undefined, node: Node) => parent is T
optional
message: string | (() => string)

Gets the parent if it matches a certain condition or throws.

Parameters

condition: (parent: Node | undefined, node: Node) => boolean
optional
message: string | (() => string)