🚨 fix: resolve linting type error

This commit is contained in:
2026-01-30 21:21:43 +07:00
parent 11a607b4da
commit 5a43769f69
7 changed files with 9 additions and 7 deletions

View File

@ -1,8 +1,10 @@
import { generateUUIDv7 } from "./uuidv7";
function createManyWithUUID<T extends { id?: string }>(items: T[]): T[] {
export const createManyWithUUID = <T extends { id?: string }>(
items: T[],
): T[] => {
return items.map((i) => ({
...i,
id: i.id ?? generateUUIDv7(),
}));
}
};