import User from '@/models/users/User' ; interface OfflineUserJson { name : string ; avatar_url : string | null ; storages : string [ ] ; } export default class OfflineUser extends User { public static fromJson ( json ) { return new OfflineUser ( json . name , json . avatar_url , json . storages ) ; } constructor ( name = 'Local (offline)' , avatarUrl = null , storages = [ 'local/' ] ) { super ( name , avatarUrl , storages ) ; } public toJson ( ) { return { name : this . name , avatar_url : this . avatarUrl , storages : this . storages , } ; } }