1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-01 09:24:20 -04:00
denoland-deno/cli/bench/testdata/npm/hono/dist/middleware/jsx/index.d.ts
2022-08-19 15:54:54 +05:30

26 lines
1.1 KiB
TypeScript

import type { StringBuffer, HtmlEscaped, HtmlEscapedString } from '../../utils/html';
declare global {
namespace jsx.JSX {
interface IntrinsicElements {
[tagName: string]: Record<string, any>;
}
}
}
declare type Child = string | number | JSXNode | Child[];
export declare class JSXNode implements HtmlEscaped {
tag: string | Function;
props: Record<string, any>;
children: Child[];
isEscaped: true;
constructor(tag: string | Function, props: Record<string, any>, children: Child[]);
toString(): string;
toStringToBuffer(buffer: StringBuffer): void;
}
export { jsxFn as jsx };
declare const jsxFn: (tag: string | Function, props: Record<string, any>, ...children: (string | HtmlEscapedString)[]) => JSXNode;
declare type FC<T = Record<string, any>> = (props: T) => HtmlEscapedString;
export declare const memo: <T>(component: FC<T>, propsAreEqual?: (prevProps: Readonly<T>, nextProps: Readonly<T>) => boolean) => FC<T>;
export declare const Fragment: (props: {
key?: string;
children?: any;
}) => JSXNode;