Files
NapCatQQ/.pnpm-store/v3/files/7e/2292f9704a95dd61b580b04648c5db88de1889d130bc94fcdeed7df24d8b131fc6312988566beaa9ce87ded76b2abf23dc162bd0ec0e3989923e579505d13f
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

24 lines
1.2 KiB
Plaintext

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.IntersectCreate = IntersectCreate;
const type_1 = require("../create/type");
const index_1 = require("../symbols/index");
// ------------------------------------------------------------------
// TypeGuard
// ------------------------------------------------------------------
const kind_1 = require("../guard/kind");
// ------------------------------------------------------------------
// IntersectCreate
// ------------------------------------------------------------------
// prettier-ignore
function IntersectCreate(T, options = {}) {
const allObjects = T.every((schema) => (0, kind_1.IsObject)(schema));
const clonedUnevaluatedProperties = (0, kind_1.IsSchema)(options.unevaluatedProperties)
? { unevaluatedProperties: options.unevaluatedProperties }
: {};
return (0, type_1.CreateType)((options.unevaluatedProperties === false || (0, kind_1.IsSchema)(options.unevaluatedProperties) || allObjects
? { ...clonedUnevaluatedProperties, [index_1.Kind]: 'Intersect', type: 'object', allOf: T }
: { ...clonedUnevaluatedProperties, [index_1.Kind]: 'Intersect', allOf: T }), options);
}