您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

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. }