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

x/ts_morph/ts_morph.d.ts>JsxAttributedNode

TypeScript Compiler API wrapper for static analysis and programmatic code changes.
Very Popular
Go to Latest
interface JsxAttributedNode
import { type JsxAttributedNode } from "https://deno.land/x/ts_morph@16.0.0/ts_morph.d.ts";

Methods

getAttributes(): JsxAttributeLike[]

Gets the JSX element's attributes.

getAttribute(name: string): JsxAttributeLike | undefined

Gets an attribute by name or returns undefined when it can't be found.

getAttribute(findFunction: (attribute: JsxAttributeLike) => boolean): JsxAttributeLike | undefined

Gets an attribute by a find function or returns undefined when it can't be found.

getAttributeOrThrow(name: string): JsxAttributeLike

Gets an attribute by name or throws when it can't be found.

getAttributeOrThrow(findFunction: (attribute: JsxAttributeLike) => boolean): JsxAttributeLike

Gets an attribute by a find function or throws when it can't be found.

Adds an attribute into the element.

Adds attributes into the element.

Inserts an attribute into the element.

insertAttributes(index: number, attributes: ReadonlyArray<OptionalKind<JsxAttributeStructure> | OptionalKind<JsxSpreadAttributeStructure>>): JsxAttributeLike[]

Inserts attributes into the element.

function JsxAttributedNode
import { JsxAttributedNode } from "https://deno.land/x/ts_morph@16.0.0/ts_morph.d.ts";

Type Parameters

T extends Constructor<JsxAttributedNodeExtensionType>