質問編集履歴
4
補足
test
CHANGED
File without changes
|
test
CHANGED
@@ -44,11 +44,11 @@
|
|
44
44
|
|
45
45
|
|
46
46
|
|
47
|
-
とりあえずの妥協策
|
47
|
+
とりあえずの妥協策(この場合、各値はその文字列しか代入不可なのでObject.freezeする必要もなさそう)
|
48
48
|
|
49
49
|
```typescript
|
50
50
|
|
51
|
-
const POKEMON_TYPE =
|
51
|
+
const POKEMON_TYPE = {
|
52
52
|
|
53
53
|
NOMAL: "ノーマル" as "ノーマル",
|
54
54
|
|
@@ -58,7 +58,7 @@
|
|
58
58
|
|
59
59
|
...
|
60
60
|
|
61
|
-
}
|
61
|
+
}
|
62
62
|
|
63
63
|
|
64
64
|
|
3
修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -60,4 +60,20 @@
|
|
60
60
|
|
61
61
|
})
|
62
62
|
|
63
|
+
|
64
|
+
|
65
|
+
// vscodeの表示
|
66
|
+
|
67
|
+
const POKEMON_TYPE: Readonly<{
|
68
|
+
|
69
|
+
NOMAL: "ノーマル",
|
70
|
+
|
71
|
+
FLAME: "ほのお",
|
72
|
+
|
73
|
+
WATER: "みず",
|
74
|
+
|
75
|
+
...
|
76
|
+
|
77
|
+
}>
|
78
|
+
|
63
79
|
```
|
2
訂正
test
CHANGED
File without changes
|
test
CHANGED
@@ -26,7 +26,7 @@
|
|
26
26
|
|
27
27
|
```
|
28
28
|
|
29
|
-
const POKEMON_TYPE
|
29
|
+
const POKEMON_TYPE: Readonly<{
|
30
30
|
|
31
31
|
NOMAL: string,
|
32
32
|
|
1
内容修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -16,7 +16,7 @@
|
|
16
16
|
|
17
17
|
...
|
18
18
|
|
19
|
-
)
|
19
|
+
})
|
20
20
|
|
21
21
|
```
|
22
22
|
|
@@ -26,7 +26,7 @@
|
|
26
26
|
|
27
27
|
```
|
28
28
|
|
29
|
-
const POKEMON_TYPE =
|
29
|
+
const POKEMON_TYPE = Readonly<{
|
30
30
|
|
31
31
|
NOMAL: string,
|
32
32
|
|
@@ -36,7 +36,7 @@
|
|
36
36
|
|
37
37
|
...
|
38
38
|
|
39
|
-
|
39
|
+
}>
|
40
40
|
|
41
41
|
```
|
42
42
|
|
@@ -58,6 +58,6 @@
|
|
58
58
|
|
59
59
|
...
|
60
60
|
|
61
|
-
)
|
61
|
+
})
|
62
62
|
|
63
63
|
```
|