Skip to main content
Module

x/ts_morph/mod.ts>Node#getFirstAncestorByKindOrThrow

TypeScript Compiler API wrapper for static analysis and programmatic code changes.
Very Popular
Go to Latest
method Node.prototype.getFirstAncestorByKindOrThrow
import { Node } from "https://deno.land/x/ts_morph@18.0.0/mod.ts";

Gets the first ancestor by syntax kind or throws if not found.

Parameters

kind: TKind
  • Syntax kind.
optional
message: string | (() => string)