Module

x/ts_morph/ts_morph.d.ts>JsxElement

TypeScript Compiler API wrapper for static analysis and programmatic code changes.
Go to Latest
class JsxElement
extends JsxElementBase<ts.JsxElement>
import { JsxElement } from "https://dotland.deno.dev/x/ts_morph@21.0.0/ts_morph.d.ts";

Methods

Gets the closing element.

Gets the children of the JSX element.

Gets the opening element.

getParent(): NodeParentType<ts.JsxElement>
getParentOrThrow(message?: string | (() => string)): NonNullable<NodeParentType<ts.JsxElement>>

Gets the structure equivalent to this node.

set(structure: Partial<JsxElementStructure>): this

Sets the node from a structure.

setBodyText(textOrWriterFunction: string | WriterFunction): this

Sets the body text.

setBodyTextInline(textOrWriterFunction: string | WriterFunction): this

Sets the body text without surrounding new lines.