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

23 lines
1015 B
Plaintext

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Object = void 0;
const type_1 = require("../create/type");
const index_1 = require("../symbols/index");
// ------------------------------------------------------------------
// TypeGuard
// ------------------------------------------------------------------
const kind_1 = require("../guard/kind");
/** Creates a RequiredArray derived from the given TProperties value. */
function RequiredArray(properties) {
return globalThis.Object.keys(properties).filter((key) => !(0, kind_1.IsOptional)(properties[key]));
}
/** `[Json]` Creates an Object type */
function _Object(properties, options) {
const required = RequiredArray(properties);
const schema = required.length > 0 ? { [index_1.Kind]: 'Object', type: 'object', required, properties } : { [index_1.Kind]: 'Object', type: 'object', properties };
return (0, type_1.CreateType)(schema, options);
}
/** `[Json]` Creates an Object type */
exports.Object = _Object;