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.
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://deno.land/x/ts_morph@16.0.0/ts_morph.d.ts";
Type Parameters
T extends Constructor<JsxAttributedNodeExtensionType>
Parameters
Base: T