Files
NapCatQQ/.pnpm-store/v3/files/03/4af1a41ab34875b284b9a5cad85d8cbedffc5995c9d02ead3f3511f28dec1b1504bec8580861981d591b8b22ec85aa06efb7f456135ba1bf069f863303f48d
TanTan e311ca3275
Build NapCat Artifacts / Windows Loader Test (push) Canceled after 0s
Build NapCat Artifacts / Type Check & Test (push) Canceled after 0s
Build NapCat Artifacts / Build NapCat.Framework (push) Canceled after 0s
Build NapCat Artifacts / Build NapCat.Shell (push) Canceled after 0s
docs: 仓库链接指向本镜像仓库
2026-11-13 09:25:58 +08:00

11 lines
509 B
Plaintext

import { TypeBoxError } from '../error/index.mjs';
import { CreateType } from '../create/type.mjs';
import { Kind } from '../symbols/index.mjs';
/** `[Json]` Creates a Ref type. The referenced type must contain a $id */
export function Ref(...args) {
const [$ref, options] = typeof args[0] === 'string' ? [args[0], args[1]] : [args[0].$id, args[1]];
if (typeof $ref !== 'string')
throw new TypeBoxError('Ref: $ref must be a string');
return CreateType({ [Kind]: 'Ref', $ref }, options);
}