import { type JsxAttributedNode } from "https://dotland.deno.dev/x/ts_morph@20.0.0/mod.ts";
Methods
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.
addAttribute(attribute: OptionalKind<JsxAttributeStructure> | OptionalKind<JsxSpreadAttributeStructure>): JsxAttributeLike
Adds an attribute into the element.
addAttributes(attributes: ReadonlyArray<OptionalKind<JsxAttributeStructure> | OptionalKind<JsxSpreadAttributeStructure>>): JsxAttributeLike[]
Adds attributes into the element.
insertAttribute(index: number, attribute: OptionalKind<JsxAttributeStructure> | OptionalKind<JsxSpreadAttributeStructure>): JsxAttributeLike
Inserts an attribute into the element.
insertAttributes(index: number, attributes: ReadonlyArray<OptionalKind<JsxAttributeStructure> | OptionalKind<JsxSpreadAttributeStructure>>): JsxAttributeLike[]
Inserts attributes into the element.
import { JsxAttributedNode } from "https://dotland.deno.dev/x/ts_morph@20.0.0/mod.ts";
Type Parameters
T extends Constructor<JsxAttributedNodeExtensionType>
Parameters
Base: T