@farris/devkit-vue
Version:
43 lines (42 loc) • 921 B
TypeScript
import { Module } from '../../module';
import { ViewModelState, ViewModel } from '../../viewmodel/index';
/**
* 状态变量路径
*/
interface VariablePath {
viewModelId: string;
propPath: string;
variable: string;
}
/**
* 变量解析器上下文
*/
interface VariableParseContext {
/**
* 模块
*/
module: Module;
/**
* 视图模型
*/
viewModel?: ViewModel<ViewModelState>;
/**
* 事件上下文参数
*/
eventParams?: Record<string, any>;
/**
* 其他上下文
*/
extraContext?: any;
}
/**
* 变量解析器接口
*/
interface VariableParser {
parse(expression: string, context: VariableParseContext): any;
}
/**
* 变量解析器注入Token
*/
declare const VARIABLE_PARSERS_TOKEN: import("../../common/index").InjectionToken<any>;
export { VariablePath, VariableParseContext, VariableParser, VARIABLE_PARSERS_TOKEN };