Files
NapCatQQ/.pnpm-store/v3/files/11/b6b756999f26029d47ad08d7ce83f1d783252ae24a0222422627e7316c43b32b62ae5cf46bb74c2d10990b5386eefd4ebed32dd1492c5f4ebb63fd072e26d9
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

25 lines
928 B
Plaintext

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ExtendsUndefinedCheck = ExtendsUndefinedCheck;
const index_1 = require("../symbols/index");
/** Fast undefined check used for properties of type undefined */
function Intersect(schema) {
return schema.allOf.every((schema) => ExtendsUndefinedCheck(schema));
}
function Union(schema) {
return schema.anyOf.some((schema) => ExtendsUndefinedCheck(schema));
}
function Not(schema) {
return !ExtendsUndefinedCheck(schema.not);
}
/** Fast undefined check used for properties of type undefined */
// prettier-ignore
function ExtendsUndefinedCheck(schema) {
return (schema[index_1.Kind] === 'Intersect' ? Intersect(schema) :
schema[index_1.Kind] === 'Union' ? Union(schema) :
schema[index_1.Kind] === 'Not' ? Not(schema) :
schema[index_1.Kind] === 'Undefined' ? true :
false);
}