摘要: typescript编译时,当我们开启严格模式时,下面的代码就会报错: function doSomething(x: string | null) { console.log("Hello, " + x.toUpperCase()); } 编译错误: hello.ts:56:29 - error 阅读全文
posted @ 2022-04-02 10:41 Liuww06 阅读(553) 评论(0) 推荐(1) 编辑