-
Notifications
You must be signed in to change notification settings - Fork 20
/
types.js
63 lines (58 loc) · 1.51 KB
/
types.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
// eslint-disable-next-line no-unused-vars
import { ObjectId } from 'mongodb';
/**
* @typedef {object} Question
* @property {ObjectId} _id
* @property {string} category
* @property {0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10} difficulty
* @property {string} subcategory
* @property {number} number
*
* @property {object} packet
* @property {ObjectId} packet._id
* @property {string} packet.name
* @property {number} packet.number
*
* @property {object} set
* @property {ObjectId} set._id
* @property {string} set.name
* @property {number} set.year
*
* @property {Date} createdAt
* @property {Date} updatedAt
*/
/**
* @typedef {object} TossupProperties
* @property {string} question
* @property {string} answer_sanitized
* @property {string} answer
*
* @typedef {Question & TossupProperties} Tossup
*/
/**
* @typedef {object} BonusProperties
* @property {string} leadin
* @property {string[]} parts
* @property {string[]} answers_sanitized
* @property {string[]} answers
* @property {number[]} [values]
* @property {("e" | "m" | "h")[]} [difficultyModifiers]
*
* @typedef {Question & BonusProperties} Bonus
*/
/**
* @typedef {object} Packet
* @property {ObjectId} _id
* @property {string} name
* @property {number} number
* @property {object} set
* @property {ObjectId} set._id
* @property {string} set.name
*/
/**
* @typedef {object} Set
* @property {ObjectId} _id
* @property {string} name
* @property {number} year
* @property {0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10} difficulty
*/