@chief-editor/flow
Version:
Old核心数据流
22 lines (21 loc) • 1.18 kB
TypeScript
import { IInterpolationOptions } from '@co-hooks/interpolation';
import { FlowBrickGlobal } from '../lib/FlowBrick';
export declare const interpolationOptions: IInterpolationOptions;
export declare type IWrappedInterpolationFunc = (input?: any) => any;
export interface IWrappedInterpolation {
watchers: string[];
func: IWrappedInterpolationFunc;
}
export declare type INeedWrapFunction = (input: any, p: FlowBrickGlobal, ...args: any[]) => any | Promise<any>;
export declare type IWrappedFunction = (...args: any[]) => Promise<any>;
export declare function wrapInterpolation(expr: string, brick: FlowBrickGlobal): IWrappedInterpolation;
export interface IJSONInterpolationAsyncConfig {
watchers: string[];
func: IWrappedFunction;
}
export interface IWrappedJSONInterpolation extends IWrappedInterpolation {
asyncMap: Record<string, IJSONInterpolationAsyncConfig>;
}
export declare function wrapJson(data: any, brick: FlowBrickGlobal): IWrappedJSONInterpolation;
export declare function wrapWatcher(watchers: string[], brick: FlowBrickGlobal): string[];
export declare function wrapFunction(func: INeedWrapFunction, path: FlowBrickGlobal): IWrappedFunction;