質問編集履歴
1
Typeの修正を行いました
title
CHANGED
File without changes
|
body
CHANGED
@@ -5,6 +5,7 @@
|
|
5
5
|
type Status = type TableStateType<T extends SchoolGrades> {
|
6
6
|
point: 'A' | 'B' | 'C'
|
7
7
|
average: number
|
8
|
+
something: T
|
8
9
|
}
|
9
10
|
```
|
10
11
|
|
@@ -16,7 +17,7 @@
|
|
16
17
|
}
|
17
18
|
|
18
19
|
export const Report = ({point, average, fn}: Props) => {
|
19
|
-
const status =
|
20
|
+
const status = {} // something object
|
20
21
|
fn(status)
|
21
22
|
return (
|
22
23
|
<>
|
@@ -36,7 +37,7 @@
|
|
36
37
|
setEnglishStatus: (status: Status<English>) => void
|
37
38
|
}
|
38
39
|
|
39
|
-
export const
|
40
|
+
export const ReportCard = ({..., fn}: Props) => {
|
40
41
|
// something process
|
41
42
|
return (
|
42
43
|
<>
|
@@ -53,7 +54,7 @@
|
|
53
54
|
|
54
55
|
## エラー
|
55
56
|
```
|
56
|
-
Type 'Status<English | Mathmatic>' is not assignable to type 'Status<English>'.
|
57
|
+
Type 'Status<English | Mathmatic | Art | Physical>' is not assignable to type 'Status<English>'.
|
57
58
|
```
|
58
59
|
|
59
60
|
## やりたいこと
|