@flow-editor/render
Version:
Dawn数据流的React实现
18 lines (17 loc) • 875 B
TypeScript
import { DawnNode, IDawnBrick, IDawnBrickConfig, IDawnPathInstance, Model, Path } from '@flow-editor/dawn';
import { IDawnPathGlobal } from '@flow-editor/dawn/src/types';
export interface IDawnBrickRenderConfig {
updateWhenLoading?: boolean;
updateWhenValidating?: boolean;
updateUntilReady?: boolean;
}
export interface IDawnPathOptions<V, DS, DP, CG, E> {
scope: DawnNode<IDawnPathGlobal>;
model: Model;
config: IDawnBrickConfig;
brick: Omit<IDawnBrick<V, DS, DP, CG, E>, 'updateBrickInfo' | 'model' | 'node' | 'brickConfig'>;
isArray?: boolean;
renderConfig?: IDawnBrickRenderConfig;
onUpdatingBrickInfo?: (instance: IDawnPathInstance<V, DS, DP, CG>, old: IDawnPathInstance<V, DS, DP, CG> | null) => void;
}
export declare function useDawnPath<V, DS, DP, CG, E>(options: IDawnPathOptions<V, DS, DP, CG, E>): Path<V, DS, DP, CG, E>;