Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/ts_morph/ts_morph.d.ts>BindingElement

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

Methods

getParent(): NodeParentType<ts.BindingElement>
getParentOrThrow(): NonNullable<NodeParentType<ts.BindingElement>>

Gets binding element's property name node or returns undefined if not found.

For example in const { a: b } = { a: 5 }, a would be the property name.

Gets binding element's property name node or throws if not found.

For example in const { a: b } = { a: 5 }, a would be the property name.