Module

x/ts_morph/mod.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://dotland.deno.dev/x/ts_morph@20.0.0/mod.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://dotland.deno.dev/x/ts_morph@20.0.0/mod.ts";

Type Parameters

T extends Constructor<JsxAttributedNodeExtensionType>