docxml
Version:
TypeScript (component) library for building and parsing a DOCX file
11 lines (10 loc) • 785 B
TypeScript
import { Component, ComponentChild, ComponentDefinition, ComponentFunction, ComponentProps } from '../classes/Component.js';
declare type ComponentComponentFunction<C extends Component> = ComponentFunction<ComponentProps<C>, ComponentChild<C>>;
/**
* 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 {@link Api}.
*/
export declare function jsx<C extends Component>(component: ComponentComponentFunction<C> | ComponentDefinition<C>, props: ComponentProps<C>, ...children: Array<ComponentChild<C> | Array<ComponentChild<C>>>): Promise<Array<C | ComponentChild<C> | ReturnType<ComponentComponentFunction<C>>>>;
export {};