Skip to main content
Extremely Popular
Go to Latest
method Node.prototype.getFirstAncestorByKind
import { Node } from "https://deno.land/x/fresh@1.2.0/src/dev/deps.ts";

Get the first ancestor by syntax kind.

Type Parameters

TKind extends SyntaxKind

Parameters

kind: TKind
  • Syntax kind.

Returns

KindToNodeMappings[TKind] | undefined