import type { LiteralUnion } from 'type-fest'; import type { ExpressionSource } from '@cloudpss/expression'; import type { ArgumentMap, ConditionExpression } from '@cloudpss/expression/definitions'; import type { PinLikeParameter } from './parameter.js'; declare const _PinDataType: readonly ["real", "integer", "logical", "text"]; /** 引脚数据类型 */ export declare const PinDataType: readonly PinDataType[]; /** 引脚数据类型 */ export type PinDataType = LiteralUnion<'' | (typeof _PinDataType)[number], string>; declare const _PinConnectionType: readonly ["electrical", "input", "output", "electricalAc", "electricalDc", "water", "hotWater", "coldWater", "ice", "hydrogen", "nitrogen", "ammonia"]; /** 连接类型*/ export declare const PinConnectionType: readonly PinConnectionType[]; /** 连接类型 */ export type PinConnectionType = LiteralUnion<'' | (typeof _PinConnectionType)[number], string>; /** 模型引脚定义 */ export interface PinDefinition { /** 实现阶段用于索引的键值,在整个模型中不能重复 */ key: string; /** 引脚名称 */ name: string; /** 引脚详细描述(MD) */ description: string; /** 引脚生效的条件表达式 */ condition?: ConditionExpression; /** 数据维数(目前最多两维) */ dim?: Array>; /** 是否有图形上的实际引脚与之对应 */ visible: boolean; /** 数据类型 */ data: PinDataType; /** 连接类型 */ connection: PinConnectionType; } /** 测试引脚定义 */ export declare function isPinDefinition(value: unknown): value is PinDefinition; /** 转换为相应的参数定义 */ export declare function toPinLikeParameter(pin: PinDefinition): PinLikeParameter; /** 未求值的引脚表 */ export type PinMap = ArgumentMap>; export {}; //# sourceMappingURL=pin.d.ts.map