import { TranslatorGenerator } from '@lcap/nasl-translator'; import StringLiteral from './StringLiteral__'; type changeType = 'up' | 'down'; interface defaultCode { code?: string; executeCode?: boolean; } import type Structure from './Structure__'; import type Module from './Module__'; import BaseNode from '../common/BaseNode'; import type TypeAnnotation from './TypeAnnotation__'; import type DefaultValue from './DefaultValue__'; /** * 数据结构属性 */ export declare class StructureProperty extends BaseNode { /** 类名 */ static readonly ConceptName: string; /** * 是否为抽象类 * 抽象类不能产生 concept: string */ static isAbstract: boolean; /** 继承链 */ static readonly inheritanceChain: string[]; /** * 产品概念 */ readonly concept: 'StructureProperty'; /** * 数据结构属性名称 */ name: string; /** * 数据结构属性标题 */ label?: string; /** * 数据结构属性描述 */ description?: string; /** * 类型 */ typeAnnotation?: TypeAnnotation; /** * 默认值 */ defaultValue?: DefaultValue; /** * 数据结构字段 JSON 的序列化别名 */ jsonName?: string; /** * @param source 需要合并的部分参数 */ constructor(source?: Partial); static from(source: any, parentNode?: any, parentKey?: string): StructureProperty; /** * 设置数据结构属性名称 */ setName(name: string): void; /** * 设置数据结构属性标题 */ setLabel(label: string): void; /** * 设置数据结构属性描述 */ setDescription(description: string): void; /** * 设置数据结构字段 JSON 的序列化别名 */ setJsonName(jsonName: string): void; /** * 祖先 Structure */ get structure(): Structure | undefined; /** * 祖先 Module */ get module(): Module; /** * 默认值toJS的结果 */ defaultCode: defaultCode; isTag(): this is StructureProperty & { defaultValue: DefaultValue & { expression: StringLiteral & { value: string; }; }; }; /** * @warning:这段代码稍微改改可能页面类型检查整体就会变慢一倍以上 */ static createProtoTypeOnly(source: Partial): StructureProperty; toEmbeddedTS(state?: import("@lcap/nasl-types/out/translator").TranslatorState, isRequired?: boolean): TranslatorGenerator; toNaturalTS(state?: import("@lcap/nasl-types/out/translator").TranslatorState): string; toTextualNASL(state?: import("@lcap/nasl-types/out/translator").TranslatorState): string; /** * 设置数据类型 * @param typeAnnotation 类型标注对象 */ setDataType(typeAnnotation: TypeAnnotation): void; /** * 设置数据类型 * @param typeAnnotation 类型唯一标识 */ setDataType(typeKey: string): void; getTokenKeyWithNamespace(): string; getNamespace(): string; static getDefaultOptions(): { typeAnnotation: { concept: string; typeKind: string; typeNamespace: string; typeName: string; }; }; /** * 是否为连接器,连接器不允许编辑 */ get isConnector(): boolean; /** * 是否可编辑 * */ get readonly(): boolean; /** * 属性上移 */ moveUp(): void; /** * 属性下移 */ moveDown(): void; /** * 数组移动位置 */ static changeSort(arr: any[], index: number, type: changeType): any[]; isSame(compareNode: StructureProperty | Partial | null): boolean; } export default StructureProperty; //# sourceMappingURL=StructureProperty__.d.ts.map