You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
942 B
26 lines
942 B
|
2 years ago
|
import { Key, VNode, VNodeData } from "./vnode";
|
||
|
|
import { ArrayOrElement } from "./h";
|
||
|
|
declare namespace JSXInternal {
|
||
|
|
type Element = VNode;
|
||
|
|
interface IntrinsicElements {
|
||
|
|
[elemName: string]: VNodeData;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
export declare type JsxVNodeChild = VNode | string | number | boolean | undefined | null;
|
||
|
|
export declare type JsxVNodeChildren = ArrayOrElement<JsxVNodeChild>;
|
||
|
|
export declare type FunctionComponent = (props: {
|
||
|
|
[prop: string]: any;
|
||
|
|
} | null, children?: VNode[]) => VNode;
|
||
|
|
export declare function Fragment(data: {
|
||
|
|
key?: Key;
|
||
|
|
} | null, ...children: JsxVNodeChildren[]): VNode;
|
||
|
|
/**
|
||
|
|
* jsx/tsx compatible factory function
|
||
|
|
* see: https://www.typescriptlang.org/docs/handbook/jsx.html#factory-functions
|
||
|
|
*/
|
||
|
|
export declare function jsx(tag: string | FunctionComponent, data: VNodeData | null, ...children: JsxVNodeChildren[]): VNode;
|
||
|
|
export declare namespace jsx {
|
||
|
|
export import JSX = JSXInternal;
|
||
|
|
}
|
||
|
|
export {};
|