export class User { public id? :number|string = 0; public token? :string; public email? :string; public username? : string; constructor (rawUser?: any) { this.id = rawUser?.id ?? ''; this.token = rawUser?.token ?? ''; this.email = rawUser?.email ?? ''; this.username = rawUser?.username ?? []; } } export class UserError { message: string; code: number; constructor(message?: string, code?: number) { this.message = message ?? 'some User error occcured'; this.code = code ?? 400; } } /** User types */ type UserProperty = keyof User; type UserKeys = UserProperty[]; export type { UserProperty, UserKeys };