1 | declare type Primitive = undefined | boolean | number | string | bigint | symbol;
|
2 | declare type Callable<T> = T | (() => T);
|
3 | export declare type Unpackable<T> = T | Iterable<T> | Iterable<Promise<T>> | Promise<T> | Promise<Iterable<T>> | Promise<Iterable<Promise<T>>> | AsyncIterable<T> | AsyncIterable<Iterable<T>> | AsyncIterable<Iterable<Promise<T>>> | Promise<AsyncIterable<T>> | Promise<AsyncIterable<Iterable<T>>> | Promise<AsyncIterable<Iterable<Promise<T>>>>;
|
4 | export declare type Renderable = null | Exclude<Primitive, symbol> | HTML | UnsafeHTML | Fallback;
|
5 | export declare type HTMLContentStatic = Unpackable<Renderable>;
|
6 | export declare type HTMLContent = Callable<HTMLContentStatic>;
|
7 | export declare abstract class AbstractHTML {
|
8 | abstract [Symbol.asyncIterator](): AsyncIterableIterator<string>;
|
9 | }
|
10 | export declare class HTML extends AbstractHTML {
|
11 | #private;
|
12 | constructor(strings: TemplateStringsArray, args: HTMLContent[]);
|
13 | [Symbol.asyncIterator](): AsyncIterableIterator<string>;
|
14 | }
|
15 | export declare class UnsafeHTML extends AbstractHTML {
|
16 | #private;
|
17 | constructor(value: string);
|
18 | [Symbol.asyncIterator](): AsyncGenerator<string, void, unknown>;
|
19 | toString(): string;
|
20 | toJSON(): string;
|
21 | }
|
22 | export declare class Fallback extends AbstractHTML {
|
23 | #private;
|
24 | constructor(content: HTMLContent, fallback: HTML | ((e: any) => HTML));
|
25 | [Symbol.asyncIterator](): AsyncGenerator<string, void, undefined>;
|
26 | }
|
27 | export declare function html(strings: TemplateStringsArray, ...args: HTMLContent[]): HTML;
|
28 | export declare function html(strings: TemplateStringsArray, ...args: any[]): HTML;
|
29 | export { html as css, html as js };
|
30 | export declare function fallback(content: HTMLContent, fallback: HTML | ((e: any) => HTML)): Fallback;
|
31 | export declare function fallback(content: any, fallback: HTML | ((e: any) => HTML)): Fallback;
|
32 | export declare function unsafeHTML(content: string): UnsafeHTML;
|
33 |
|
\ | No newline at end of file |