77760d0c8dc35efa44be5580377137c29c74250c
typescript/Parameter 'x' implicitly has an 'any' type.Vetur(7006).md
... | ... | @@ -5,7 +5,14 @@ nuxtjsで、 |
5 | 5 | async created() { |
6 | 6 | const response = await this.$axios.get('/api') |
7 | 7 | if (response) { |
8 | - this.all_counselors_name = response.data.map((x) => x.name) |
|
8 | + this.all_name = response.data.map((x) => x.name) |
|
9 | 9 | } |
10 | 10 | }, |
11 | -``` |
|
... | ... | \ No newline at end of file |
0 | +``` |
|
1 | +で`(x)`にこのエラーが出た。 |
|
2 | + |
|
3 | +### 解決方法 |
|
4 | +``` |
|
5 | + this.all_name = response.data.map((x: Hoge) => x.name) |
|
6 | +``` |
|
7 | +`Hoge`のところに適切な型ヒントを追加する |
|
... | ... | \ No newline at end of file |