export type Outcome = "Success" | "Error" /* Responses */ export class Response{ constructor( public message?:string ){} } export class SuccessResponse extends Response{ result:Outcome = "Success" constructor( message?:string ){ super(message) } } export class ErrorResponse extends Response{ result:Outcome = "Error" constructor( message: string = "Unknown error" ){ super(message) } } export class SubscriptionResponse extends SuccessResponse{ constructor( public uid: string, message?:string ){ super(message) } }