model.d.ts 606 B

123456789101112131415161718192021222324252627282930313233343536
  1. declare const enum ChatType {
  2. Private = 'private',
  3. Group = 'group',
  4. Temp = 'temp'
  5. }
  6. interface IPrivateChat {
  7. chatID: number;
  8. chatType: ChatType.Private;
  9. }
  10. interface IGroupChat {
  11. chatID: number;
  12. chatType: ChatType.Group;
  13. }
  14. interface ITempChat {
  15. chatID: {qq: number, group: number, toString: () => string};
  16. chatType: ChatType.Temp;
  17. }
  18. type IChat = IPrivateChat | IGroupChat | ITempChat;
  19. interface ILock {
  20. workon: number;
  21. feed: string[];
  22. threads: {
  23. [key: string]:
  24. {
  25. id: number,
  26. offset: string,
  27. updatedAt: string,
  28. subscribers: IChat[],
  29. },
  30. };
  31. }