Files
NapCatQQ/.pnpm-store/v3/files/5e/b80cdf311ea61c9128f2f41859d0e53358676d9eb550b7cc520df613a44eb598ac23ae5d8caa16fd5f1dc08b1489c9c3d4a88e55580fe73b966407be8f0821
T
TanTan e311ca3275
Build NapCat Artifacts / Type Check & Test (push) Waiting to run
docs: 仓库链接指向本镜像仓库
2026-11-13 09:25:58 +08:00

10 lines
470 B
Plaintext

import { CreateType } from '../create/type.mjs';
import { Kind } from '../symbols/index.mjs';
/** `[Json]` Creates a Tuple type */
export function Tuple(types, options) {
// prettier-ignore
return CreateType(types.length > 0 ?
{ [Kind]: 'Tuple', type: 'array', items: types, additionalItems: false, minItems: types.length, maxItems: types.length } :
{ [Kind]: 'Tuple', type: 'array', minItems: types.length, maxItems: types.length }, options);
}