選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

shelf.ts 655 B

123456789101112131415161718192021222324252627282930
  1. import { viewPermissionType } from "./variables";
  2. import { Word } from "./word";
  3. 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 MobileShelf extends Shelf {
  24. _id: string,
  25. }