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

27 lines
1001 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");
function RequiredKeys(properties) {
const keys = [];
for (let key in properties) {
if (!(0, kind_1.IsOptional)(properties[key]))
keys.push(key);
}
return keys;
}
/** `[Json]` Creates an Object type */
function _Object(properties, options) {
const required = RequiredKeys(properties);
const schematic = required.length > 0 ? { [index_1.Kind]: 'Object', type: 'object', properties, required } : { [index_1.Kind]: 'Object', type: 'object', properties };
return (0, type_1.CreateType)(schematic, options);
}
/** `[Json]` Creates an Object type */
exports.Object = _Object;