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

29 lines
948 B
Plaintext

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.PickFromMappedKey = PickFromMappedKey;
const index_1 = require("../mapped/index");
const pick_1 = require("./pick");
const value_1 = require("../clone/value");
// prettier-ignore
function FromPropertyKey(type, key, options) {
return {
[key]: (0, pick_1.Pick)(type, [key], (0, value_1.Clone)(options))
};
}
// prettier-ignore
function FromPropertyKeys(type, propertyKeys, options) {
return propertyKeys.reduce((result, leftKey) => {
return { ...result, ...FromPropertyKey(type, leftKey, options) };
}, {});
}
// prettier-ignore
function FromMappedKey(type, mappedKey, options) {
return FromPropertyKeys(type, mappedKey.keys, options);
}
// prettier-ignore
function PickFromMappedKey(type, mappedKey, options) {
const properties = FromMappedKey(type, mappedKey, options);
return (0, index_1.MappedResult)(properties);
}