import type { ConceptTypeofClassMap } from '../concepts/utils/types'; export interface PropertyDescriptorInput { /** 子节点类型 */ objectRef?: string; /** * 是否是数组类型 * * @default false */ isArray?: boolean; /** * 默认值 * * @default undefined */ defaultValue?: any; /** * 跳过实例化 * * @description 部分情况下节点并不需要实例化,直接使用原始数据即可, * 这种情况多半是因为原始数据已经是实例化过了,然后要保持其上下级引用关系,当前节点只是暂时持有它的引用 * @default false */ skipInstantiate?: boolean; /** * 兼容实例化 * * @description 部分情况下节点源数据会缺失`concept`属性,比如在大量模板中`ConfigPropertyValue`节点都缺失了其`concept`, * 导致实例化失败,为了兼容此情况,强制使用定义的`objectRef`来进行实例化,若是有多个`objectRef`,会使用最后的构造函数。 * @default false */ compatInstantiate?: boolean; } export interface PropertyDescriptor extends Omit { /** 属性名称 */ key: string; /** 子节点类型 */ objectRef: (keyof ConceptTypeofClassMap)[]; } export type ConceptMeta = { /** 节点构造器 */ constructor: T extends keyof ConceptTypeofClassMap ? ConceptTypeofClassMap[T] : { new (...args: any[]): any; }; /** * Nasl 上声明的属性 */ propertyMap: Map; /** * 实例化白名单属性 */ whitePropertyMap: Map; /** * 子节点 */ childProperties: string[]; /** * 数组子节点 */ childrenProperties: string[]; /** * 普通子节点 */ normalProperties: string[]; }; export type ConceptMap = Map; export declare const ConceptMap: ConceptMap; export declare const ClassMap: Map any>; //# sourceMappingURL=constant.d.ts.map