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

23 lines
774 B
Plaintext

import { MappedResult } from '../mapped/index.mjs';
import { Omit } from './omit.mjs';
import { Clone } from '../clone/value.mjs';
// prettier-ignore
function FromPropertyKey(type, key, options) {
return { [key]: Omit(type, [key], Clone(options)) };
}
// prettier-ignore
function FromPropertyKeys(type, propertyKeys, options) {
return propertyKeys.reduce((Acc, LK) => {
return { ...Acc, ...FromPropertyKey(type, LK, options) };
}, {});
}
// prettier-ignore
function FromMappedKey(type, mappedKey, options) {
return FromPropertyKeys(type, mappedKey.keys, options);
}
// prettier-ignore
export function OmitFromMappedKey(type, mappedKey, options) {
const properties = FromMappedKey(type, mappedKey, options);
return MappedResult(properties);
}