react-imported-component
Version:
I will import your component, and help to handle it
30 lines (29 loc) • 1.05 kB
TypeScript
import { Loadable, Mark, Stream } from '../types';
export declare const consumeMark: (stream: Stream | undefined, marks: string[]) => void;
export declare const assignLoadableMark: (mark: Mark, loadable: Loadable<any>) => void;
/**
* returns marks used in the stream
* @param stream
*/
export declare const getUsedMarks: (stream?: Stream) => string[];
/**
* SSR
* @returns list or marks used
*/
export declare const drainHydrateMarks: (stream?: Stream) => string[];
/**
* Loads a given marks/chunks
* @see returns a promise for a given marks only. In order to await all requests currently in flight use {@link waitForMarks}
* @param marks
* @returns a resolution promise
*/
export declare const rehydrateMarks: (marks?: string[] | undefined) => Promise<unknown>;
/**
* waits for the given marks to load
* @param marks
*/
export declare const waitForMarks: (marks: string[]) => Promise<unknown>;
/**
* @returns a <script> tag with all used marks
*/
export declare const printDrainHydrateMarks: (stream?: Stream | undefined) => string;