Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

shelf.ts 802 B

4 år sedan
4 år sedan
4 år sedan
1234567891011121314151617181920212223242526272829303132333435
  1. import { viewPermissionType } from "./variables";
  2. import { MobileWord, Word } from "./word";
  3. export interface ShelfWord {
  4. word: Word,
  5. notes: Array<string>,
  6. nextRevisionDateTime: Date,
  7. spaceBetweenRecall: number, // in Days
  8. isArchived: boolean,
  9. }
  10. export interface Shelf {
  11. name: string,
  12. description?: string,
  13. viewType: viewPermissionType,
  14. isArchived: boolean,
  15. words?: Array<ShelfWord>
  16. }
  17. export interface MongoShelfWord extends Omit<ShelfWord, "word"> {
  18. word: string,
  19. }
  20. export interface MongoShelf extends Omit<Shelf, "words"> {
  21. words?: Array<MongoShelfWord>
  22. }
  23. export interface MobileShelfWord extends Omit<ShelfWord, "word"> {
  24. word: MobileWord,
  25. }
  26. export interface MobileShelf extends Shelf {
  27. _id: string,
  28. words?: Array<MobileShelfWord>,
  29. }