es6 可以正常支持,但是在 ts 中这样写会报错
1
windzzm OP tsc 编译后提示:error TS2461: Type '"hello wold"' is not an array type.
|
![]() |
2
cyrbuzz 2022-10-08 12:54:20 +08:00
换下版本 4.6.4 没报错,不然 ts-ignore 。
|
![]() |
4
Trim21 2022-10-08 12:58:41 +08:00
Type '"hello"' can only be iterated through when using the '--downlevelIteration' flag or with a '--target' of 'es2015' or higher.
|
![]() |
7
ifdef 2022-10-08 13:09:34 +08:00

|
![]() |
8
ifdef 2022-10-08 13:10:17 +08:00
|
![]() |
12
Trim21 2022-10-08 13:22:05 +08:00 via Android
@windzzm 用 tsc $filename 指定文件名转译的时候 tsconfig.json 是无效的
|
14
kkll7766 2022-11-22 06:23:00 +08:00
|