12345678910111213141516171819202122232425262728293031323334353637 |
-
- export type Outcome = "Success" | "Error"
-
- 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)
- }
- }
|