import { Option, Result } from "./utils.ts"; export type User = { id: number; username: string; passwordHash: string; }; export type Session = { id: number; userId: number; }; export interface Database { createUser(init: Omit): Promise>; userWithId(id: number): Promise, string>>; userWithUsername(username: string): Promise, string>>; userWithUsernameExists(username: string): Promise>; createSession(init: Omit): Promise>; sessionWithId(id: number): Promise, string>>; }