You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Responses.ts 640B

1234567891011121314151617181920212223242526272829303132333435363738
  1. export type Outcome = "Success" | "Error"
  2. /* Responses */
  3. export class Response{
  4. constructor(
  5. public message?:string
  6. ){}
  7. }
  8. export class SuccessResponse extends Response{
  9. result:Outcome = "Success"
  10. constructor(
  11. message?:string
  12. ){
  13. super(message)
  14. }
  15. }
  16. export class ErrorResponse extends Response{
  17. result:Outcome = "Error"
  18. constructor(
  19. message: string = "Unknown error"
  20. ){
  21. super(message)
  22. }
  23. }
  24. export class SubscriptionResponse extends SuccessResponse{
  25. constructor(
  26. public uid: string,
  27. message?:string
  28. ){
  29. super(message)
  30. }
  31. }