@shakerquiz/utilities 4.0.17 → 4.0.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/source/entities/mode.js +14 -8
- package/source/entities/phase.js +17 -14
- package/source/entities/quantifier.js +29 -26
package/package.json
CHANGED
package/source/entities/mode.js
CHANGED
|
@@ -1,9 +1,15 @@
|
|
|
1
|
-
export const
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
export const Modes = Object.freeze(
|
|
2
|
+
/** @type {const} */ ([
|
|
3
|
+
'Known',
|
|
4
|
+
'Unknown',
|
|
5
|
+
]),
|
|
6
|
+
)
|
|
5
7
|
|
|
6
|
-
export const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
])
|
|
8
|
+
export const Mode = Object.freeze(
|
|
9
|
+
/** @type {{ [x in typeof Modes[number]]: x }} */ (
|
|
10
|
+
Modes.reduce(
|
|
11
|
+
(o, x) => (o[x] = x, o),
|
|
12
|
+
{},
|
|
13
|
+
)
|
|
14
|
+
),
|
|
15
|
+
)
|
package/source/entities/phase.js
CHANGED
|
@@ -1,15 +1,18 @@
|
|
|
1
|
-
export const
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
export const Phases = Object.freeze(
|
|
2
|
+
/** @type {const} */ ([
|
|
3
|
+
'Idle',
|
|
4
|
+
'Loading',
|
|
5
|
+
'Loaded',
|
|
6
|
+
'Aborted',
|
|
7
|
+
'Failed',
|
|
8
|
+
]),
|
|
9
|
+
)
|
|
8
10
|
|
|
9
|
-
export const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
11
|
+
export const Phase = Object.freeze(
|
|
12
|
+
/** @type {{ [x in typeof Phases[number]]: x }} */ (
|
|
13
|
+
Phases.reduce(
|
|
14
|
+
(o, x) => (o[x] = x, o),
|
|
15
|
+
{},
|
|
16
|
+
)
|
|
17
|
+
),
|
|
18
|
+
)
|
|
@@ -1,41 +1,44 @@
|
|
|
1
|
-
export const
|
|
2
|
-
|
|
3
|
-
'None': 'None',
|
|
4
|
-
'Single': 'Single',
|
|
5
|
-
'Many': 'Many',
|
|
6
|
-
'All': 'All',
|
|
7
|
-
})
|
|
8
|
-
|
|
9
|
-
export const Quantifiers = Object.freeze([
|
|
10
|
-
'Any',
|
|
11
|
-
'None',
|
|
12
|
-
'Single',
|
|
13
|
-
'Many',
|
|
14
|
-
'All',
|
|
15
|
-
])
|
|
16
|
-
|
|
17
|
-
export const QuantifierQuantifiers = Object.freeze({
|
|
18
|
-
'Any': Object.freeze([
|
|
1
|
+
export const Quantifiers = Object.freeze(
|
|
2
|
+
/** @type {const} */ ([
|
|
19
3
|
'Any',
|
|
20
4
|
'None',
|
|
21
5
|
'Single',
|
|
22
6
|
'Many',
|
|
23
7
|
'All',
|
|
24
8
|
]),
|
|
9
|
+
)
|
|
25
10
|
|
|
26
|
-
|
|
27
|
-
|
|
11
|
+
export const Quantifier = Object.freeze(
|
|
12
|
+
/** @type {{ [x in typeof Quantifiers[number]]: x }} */ (
|
|
13
|
+
Quantifiers.reduce(
|
|
14
|
+
(o, x) => (o[x] = x, o),
|
|
15
|
+
{},
|
|
16
|
+
)
|
|
17
|
+
),
|
|
18
|
+
)
|
|
19
|
+
|
|
20
|
+
export const QuantifierQuantifiers = Object.freeze({
|
|
21
|
+
[Quantifier['Any']]: Object.freeze([
|
|
22
|
+
Quantifier['Any'],
|
|
23
|
+
Quantifier['None'],
|
|
24
|
+
Quantifier['Single'],
|
|
25
|
+
Quantifier['Many'],
|
|
26
|
+
Quantifier['All'],
|
|
28
27
|
]),
|
|
29
28
|
|
|
30
|
-
'
|
|
31
|
-
'
|
|
29
|
+
[Quantifier['None']]: Object.freeze([
|
|
30
|
+
Quantifier['None'],
|
|
32
31
|
]),
|
|
33
32
|
|
|
34
|
-
'
|
|
35
|
-
'
|
|
33
|
+
[Quantifier['Single']]: Object.freeze([
|
|
34
|
+
Quantifier['Single'],
|
|
36
35
|
]),
|
|
37
36
|
|
|
38
|
-
'
|
|
39
|
-
'
|
|
37
|
+
[Quantifier['Many']]: Object.freeze([
|
|
38
|
+
Quantifier['Many'],
|
|
39
|
+
]),
|
|
40
|
+
|
|
41
|
+
[Quantifier['All']]: Object.freeze([
|
|
42
|
+
Quantifier['All'],
|
|
40
43
|
]),
|
|
41
44
|
})
|