[]previous and next page

JSXOpeningElementNode

The opening tag of a JSX element, with its attributes.

The opening tag of a JSX element, with its attributes.

Import#

ts
import type { JSXOpeningElementNode } from "@shadow-js/compiler";

Signature#

ts
interface JSXOpeningElementNode extends PluginNode {
  /** `"JSXOpeningElement"`. */
  readonly type: "JSXOpeningElement";
  /** The tag name. */
  readonly name: JSXIdentifierNode | JSXNamespacedNameNode | JSXMemberExpressionNode;
  /** The attributes, in source order. */
  readonly attributes: readonly (JSXAttributeNode | JSXSpreadAttributeNode)[];
  /** True for `<tag />`. */
  readonly selfClosing: boolean;
}

Members#

Name Type Description
type readonly type: "JSXOpeningElement" "JSXOpeningElement".
name readonly name: JSXIdentifierNode | JSXNamespacedNameNode | JSXMemberExpressionNode The tag name.
attributes readonly attributes: readonly (JSXAttributeNode | JSXSpreadAttributeNode)[] The attributes, in source order.
selfClosing readonly selfClosing: boolean True for <tag />.