Lio*_*l B 5 typescript create-react-app
我只是用带有 typescript 选项的 CRA2 初始化一个新项目(https://facebook.github.io/create-react-app/docs/adding-typescript#docsNav)
但是当我在 App.tsx 上写这个时,我不能在文件上使用 ts-ignore
let a = 1
/* @ts-ignore */
a = '123'
Run Code Online (Sandbox Code Playgroud)
启动纱线启动后,我得到:
Type error: Type '"123"' is not assignable to type 'number'.
Run Code Online (Sandbox Code Playgroud)
谢谢
归档时间: |
|
查看次数: |
661 次 |
最近记录: |