mirror of
https://github.com/x1xhlol/system-prompts-and-models-of-ai-tools.git
synced 2025-12-17 14:05:12 +00:00
20 lines
529 B
TypeScript
20 lines
529 B
TypeScript
// Intentionally not using a relative path to take advantage of
|
|
// the TS version resolution mechanism
|
|
import { Component, ComponentChild, ComponentChildren } from 'preact';
|
|
|
|
//
|
|
// Suspense/lazy
|
|
// -----------------------------------
|
|
export function lazy<T>(
|
|
loader: () => Promise<{ default: T } | T>
|
|
): T extends { default: infer U } ? U : T;
|
|
|
|
export interface SuspenseProps {
|
|
children?: ComponentChildren;
|
|
fallback: ComponentChildren;
|
|
}
|
|
|
|
export class Suspense extends Component<SuspenseProps> {
|
|
render(): ComponentChild;
|
|
}
|