Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/docxml/src/utilities/jsx.ts>jsx

TypeScript (component) library for building and parsing a DOCX file
Go to Latest
function jsx
import { jsx } from "https://deno.land/x/docxml@5.9.0/src/utilities/jsx.ts";

The JSX pragma with which you can write <Paragraph> instead of new Paragraph({}).

Also exposed as the jsx prop on the (static) class as well as instance of this library's top- level API -- see also Api.

Parameters

component: ComponentComponentFunction<C> | ComponentDefinition<C>
...children: Array<ComponentChild<C> | Array<ComponentChild<C>>>

Returns

Promise<Array<C | ComponentChild<C> | ReturnType<ComponentComponentFunction<C>>>>