import { User } from "../services" ; export class UserStore { private users : { [ k ] : User ; } = { } ; async update ( user ) { if ( ! user . createdAt ) { user . createdAt = new Date ( ) . toISOString ( ) ; } this . users [ user . id ] = user ; return user ; } async delete ( id ) { delete this . users [ id ] ; } }