@mui/internal-docs-infra
Version:
MUI Infra - internal documentation creation tools.
18 lines • 1.15 kB
text/typescript
import * as React from 'react';
import type { AbstractCreateStreamOptions, CreateStreamMeta } from "./types.mjs";
/**
* Factory-factory for chunked objects, mirroring `abstractCreateDemo`. Binds the
* chunk config and produces a component that renders the chunk with the build-
* time `precompute` (from `meta`) injected as its preloaded data - so a
* precomputed chunk renders directly, and a non-precomputed one falls back to
* the config's loaders.
*
* The `url` is the call-site identity (from `import.meta.url`) used by the
* build-time loader to inject `precompute`; it is not needed at runtime.
*/
export declare function abstractCreateStream<T extends {}, P = unknown, O = unknown>(options: AbstractCreateStreamOptions<T, P, O>, url: string, meta?: CreateStreamMeta<P, O>): React.ComponentType<T>;
/**
* Bind chunk options once and get a `createStream(url, meta?)` entry
* point (mirrors `createDemoFactory` -> `createDemo`).
*/
export declare function createStreamFactory<T extends {}, P = unknown, O = unknown>(options: AbstractCreateStreamOptions<T, P, O>): (url: string, meta?: CreateStreamMeta<P, O>) => React.ComponentType<T>;