@lcap/asl
Version:
NetEase Application Specific Language
76 lines (75 loc) • 1.69 kB
TypeScript
import { LEVEL_ENUM, Vertex, Logic, Schema } from '..';
/**
* 开发时所有的变量,一般用于数据类型变更等
*/
export declare const variablesMap: Map<string, BaseVariable>;
export declare function updateVariablesChildrenSchema(schemaRef: string): void;
/**
* 针对 param1.b.c 的形式,c 实体修改后需要改 param1 的 childrenSchema
* 建立反向引用太复杂,干脆直接更新全量引用类型的变量结构
*/
export declare function updateAllVariablesChildrenSchema(): void;
/**
* 逻辑输入参数
*/
export declare class BaseVariable extends Vertex {
/**
* 概念类型
*/
readonly level: LEVEL_ENUM;
/**
* 参数类型
* 这里暂时用不到,固定
*/
readonly type = "Identifier";
/**
* Id
*/
readonly id: string;
/**
* 代码唯一标识
*/
readonly code: string;
/**
* 名称
*/
readonly name: string;
/**
* 描述
*/
readonly description: string;
/**
* 位置
*/
readonly _posIndex: number;
/**
* 逻辑Id
*/
readonly logicId: string;
/**
* 逻辑
*/
readonly logic: Logic;
/**
* 描述
*/
readonly schema: Schema;
readonly schemaChildren: Array<Schema>;
/**
* 是否必须
*/
readonly required: boolean;
/**
* 节点是否为叶子节点
* 前端 UI 状态
*/
isLeaf: boolean;
/**
* @param source 需要合并的部分参数
*/
constructor(source?: Partial<BaseVariable>);
assign(source: any): void;
genCode(): string;
genSchemaChildren(): void;
}
export default BaseVariable;