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

23 lines
834 B
Plaintext

import { Index } from './indexed.mjs';
import { MappedResult } from '../mapped/index.mjs';
import { Clone } from '../clone/value.mjs';
// prettier-ignore
function MappedIndexPropertyKey(type, key, options) {
return { [key]: Index(type, [key], Clone(options)) };
}
// prettier-ignore
function MappedIndexPropertyKeys(type, propertyKeys, options) {
return propertyKeys.reduce((result, left) => {
return { ...result, ...MappedIndexPropertyKey(type, left, options) };
}, {});
}
// prettier-ignore
function MappedIndexProperties(type, mappedKey, options) {
return MappedIndexPropertyKeys(type, mappedKey.keys, options);
}
// prettier-ignore
export function IndexFromMappedKey(type, mappedKey, options) {
const properties = MappedIndexProperties(type, mappedKey, options);
return MappedResult(properties);
}