[LayaAir 2.0]2.3.0beta版本,代码有错误还能编译成功

随便写一段代码,调用一个不存在的方法图1是在2.1.1.1版本上的测试结果,编译时报错
图2是在2.3.0beta版本的测试结果,编译时不报错
 
还有其他情况,除非是涉及Laya的函数,其他的方法或者参数出错,编译器均不会报错
2.png 1.png
已邀请:

kylin9718

赞同来自:

将typescript的语法检查打开即可,未来我们会默认为打开
```
typescript({
                check: false, //Set to false to avoid doing any diagnostic checks on the code
                tsconfigOverride:{compilerOptions:{removeComments: true}}
            }),
```
改为:
typescript({
                check: true, //Set to false to avoid doing any diagnostic checks on the code
                tsconfigOverride:{compilerOptions:{removeComments: true}}
            }),

Aar0n

赞同来自:

有时候报错不影响的,可能是误报

189*****410

赞同来自:

现在的问题是,编译不报错!!!typescript编译都不报错,我还用它干什么!注意:是有错误的时候编译都不报错!!!

该问题目前已经被锁定, 无法添加新回复

商务合作
商务合作