@lcap/nasl
Version:
NetEase Application Specific Language
52 lines • 1.78 kB
TypeScript
import { App, BaseNode } from 'src/concepts';
export declare const getLogicType: (activeLogic: any) => string;
export declare const getUsedModule: (json: BaseNode) => any;
/**
* 根据生成的 NASL JSON,获取未导入的模块
* @param json: 当前生成的 NASL JSON
* @param app: 当前应用
* @param material: 召回的所有 Module
* @returns 需要导入的所有 Module 信息,包含 category、symbol、version
*/
export declare const getUnImportedModulesForLogic: (json: BaseNode, app: App, material: any) => any;
export declare const handleReNameJSON: (renameNodes: any, json: any) => any;
/**
* 找到当前节点所使用的当前逻辑、服务端逻辑、组件相关的推导类型
* @param app: 当前应用
* @returns 推导类型集合
*/
export declare const deduceType: (app: App, activeDesignerNode: any) => Promise<{
typeMap: any;
}>;
/**
* 组合所有的可推导类型
* @param app: 当前应用
* @returns 推导类型集合
*/
export declare const deduceTypeAll: (app: App) => Promise<{
typeMapAll: any;
}>;
export declare const replaceId: (node: any) => any;
export declare const genAIUID: (node: any, sessionId: string, num?: number) => {
node: any;
number: number;
};
interface RelationType {
name: string;
score: number;
}
/**
* 获取关系类型
* @typeAnnotation 类型注解
* @returns RelationType[]
*/
export declare const getRelationTypesFromTypeAnnotation: (typeAnnotation: any) => any;
/**
* 获取 nasl 节点关联的所有自定义类型
* @param app: nasl json 实例化版
* @param node: 节点 实例化版
* @param weight: 权重
*/
export declare const getNodeRelationTypes: (app: any, node: any, weight?: number) => RelationType[];
export {};
//# sourceMappingURL=tools.d.ts.map