[]previous and next page

TemplateElementNode

One chunk of a template literal.

One chunk of a template literal.

Import#

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

Signature#

ts
interface TemplateElementNode extends PluginNode {
  /** `"TemplateElement"`. */
  readonly type: "TemplateElement";
  /** The text of the chunk: as written (`raw`) and with escapes resolved (`cooked`). */
  readonly value: { readonly raw: string; readonly cooked: string | null };
}

Members#

Name Type Description
type readonly type: "TemplateElement" "TemplateElement".
value readonly value: { readonly raw: string; readonly cooked: string | null } The text of the chunk: as written (raw) and with escapes resolved (cooked).