feat: 2.0.0 beta release

This commit is contained in:
2025-08-14 23:55:04 +02:00
parent 2eba1475c5
commit fab3476515
71 changed files with 2171 additions and 8936 deletions

45
tests/users.mock.ts Normal file
View File

@@ -0,0 +1,45 @@
import { clone } from "../src/clone.ts";
import { WithId } from "../src/types.ts";
const users: WithId<UserDocument>[] = [
{
id: "user-1",
name: "John Doe",
email: "john.doe@test.none",
friends: [
{
id: "user-2",
alias: "Jane",
},
],
interests: ["movies", "tv", "sports"],
},
{
id: "user-2",
name: "Jane Doe",
email: "jane.doe@test.none",
friends: [
{
id: "user-1",
alias: "John",
},
],
interests: ["movies", "fitness", "dance"],
},
];
export function getUsers(): WithId<UserDocument>[] {
return clone(users);
}
export type UserDocument = {
name: string;
email: string;
friends: Friend[];
interests: string[];
};
type Friend = {
id: string;
alias: string;
};