@vtj/coder
Version:
VVTJ.PRO 是一个开源的、AI 驱动的 Vue3 企业级应用开发平台,通过 AI 智能体与可视化编排实现高效开发,并支持导出标准 Vue 代码以避免平台锁定。
33 lines (32 loc) • 1.25 kB
TypeScript
import { BlockSchema } from '@vtj/core';
import { GlobalApiConfig } from './globalApi';
/**
* 符号表:标识 DSL 中可识别的 this.xxx 引用属于哪一类
* Composition 模式出码时根据符号类别决定如何转换
*/
export interface SymbolTable {
/** ref 声明集(需要 .value 解包)*/
refs: Set<string>;
/** reactive 声明集 + state(直接使用) */
reactives: Set<string>;
/** computed 声明集(需要 .value 解包) */
computed: Set<string>;
/** methods 声明集(顶层函数) */
methods: Set<string>;
/** props 名集(通过 props.xxx 访问) */
props: Set<string>;
/** composables 暴露的名集(包含 destructure) */
composables: Set<string>;
/** inject 名集(顶层变量) */
injects: Set<string>;
/** dataSources 名集(顶层函数) */
dataSources: Set<string>;
/** 是否生成 state reactive 声明 */
hasState: boolean;
/** 有效的全局 API 映射表(基础 Map + 当前 UI 库 Map) */
effectiveApiMap: Record<string, GlobalApiConfig>;
}
/**
* 构建符号表
*/
export declare function buildSymbolTable(dsl: BlockSchema, effectiveApiMap?: Record<string, GlobalApiConfig>): SymbolTable;