Module

x/ts_morph/mod.ts>JsxElement

TypeScript Compiler API wrapper for static analysis and programmatic code changes.
Very Popular
Go to Latest
class JsxElement
extends JsxElementBase<ts.JsxElement>
import { JsxElement } from "https://dotland.deno.dev/x/ts_morph@17.0.0/mod.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.