-
Notifications
You must be signed in to change notification settings - Fork 0
/
types.d.ts
21 lines (17 loc) · 940 Bytes
/
types.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// TODO: move these into their respective packages.
declare module 'react-server-dom-parcel/client' {
export function createFromFetch<T>(res: Promise<Response>): Promise<T>;
export function createFromReadableStream<T>(stream: ReadableStream): Promise<T>;
export function encodeReply(value: any): Promise<string | URLSearchParams | FormData>;
type CallServerCallback = <T>(id: string, args: any[]) => Promise<T>;
export function setServerCallback(cb: CallServerCallback): void;
}
declare module 'react-server-dom-parcel/server.edge' {
export function renderToReadableStream(value: any): ReadableStream;
export function loadServerAction(id: string): Promise<(...args: any[]) => any>;
export function decodeReply<T>(body: string | FormData): Promise<T>;
export function decodeAction(body: FormData): Promise<(...args: any[]) => any>;
}
declare module '@parcel/runtime-rsc' {
export function Resources(): JSX.Element;
}