export interface User { id: number; name: string; email: string; createdAt: Date; } export interface Admin extends User { permissions: string[]; role: 'admin' | 'superadmin'; } export type UserId = number | string; export type AdminResponse = { user: Admin; token: string; }; export type ApiResponse = { data: T; status: number; message: string; }; export interface Session { id: string; userId: UserId; expiresAt: Date; } export enum Status { Pending = 'pending', Active = 'active', Inactive = 'inactive' } export type ComplexType = { nested: { deep: { value: string; }; }; union: 'a' | 'b' | 'c' | 'd' | 'e' | 'f'; intersection: User & { extra: string }; }; export type ConditionalType = T extends string ? 'string' : T extends number ? 'number' : 'unknown'; export type DeepPartial = { [P in keyof T]?: T[P] extends object ? DeepPartial : T[P]; };