This commit is contained in:
undefined committed 2024-11-05 09:02:20 +08:00
1 parent 8e31fb5b00
commit 9496f9c379
5 files changed
+7 -7

No files matched your search

+1 -1
View File
@@ -1,5 +1,5 @@
export function buildProjection<T extends string | number = string>(fields: readonly T[]): Record<T, true> {
const o: Record<T, true> = {} as any;
const o: Record<T, true> = Object.create(null);
for (const k of fields) o[k] = true;
return o;
}