UNPKG

@vtj/coder

Version:

VVTJ.PRO 是一个开源的、AI 驱动的 Vue3 企业级应用开发平台,通过 AI 智能体与可视化编排实现高效开发,并支持导出标准 Vue 代码以避免平台锁定。

24 lines (23 loc) 895 B
import { JSFunction } from '@vtj/core'; import { SymbolTable } from './symbolTable'; /** * Uniapp 专用生命周期钩子 */ export declare const UNI_HOOKS: Set<string>; export interface LifeCyclesResult { /** 顶层 onXxx() 调用语句 */ statements: string[]; /** 实际使用到的 Vue Composition 钩子(用于 vue import 收集) */ usedHooks: Set<string>; /** 实际使用到的 Uniapp 专用钩子(用于 @dcloudio/uni-app import 收集) */ usedUniHooks: Set<string>; } /** * 解析 lifeCycles 为 Composition 顶层 onXxx() 调用 * * 注意: * - created / beforeCreate 不在此处理(由 setupStatements 处理) * - mounted 等 Options 命名自动映射为 onMounted * - 已是 onXxx 的直接使用 */ export declare function parseLifeCycles(lifeCycles: Record<string, JSFunction> | undefined, symbols: SymbolTable): LifeCyclesResult;