ts的工程,类型不对,不提示编译错误。是哪块还需要配置吗?

  • Creator 版本:2.0.10

  • 目标平台: web

  • 详细报错信息,包含调用堆栈:

  • 重现方式:

  • 之前哪个版本是正常的 :

  • 手机型号 :

  • 手机浏览器 :

  • 编辑器操作系统 :mac

  • 编辑器之前是否有其它报错 :

  • 出现概率:

  • 额外线索:
    代码如下:
    const {ccclass, property} = cc._decorator;

@ccclass
export default class NewClass extends cc.Component {

@property(cc.Label)
label: cc.Label = null;

@property
text: string = 'hello';

// LIFE-CYCLE CALLBACKS:

// onLoad () {}

start () {
    this.label.string = this.text;
    this.doSth('123');//这里应该编译错误,但是在编辑器里没有任何报错,那不就失去ts的优势了。
}

doSth (abc: cc.Label) {
    console.log(abc);
}

// update (dt) {}

}

你方法里面接受的参数是cc.Label的类型,你调用这个方法却传的是string类型当然会报错啊

你的 vscode 卡了吧,这么明显的肯定爆红的

那应该还是哪里配置不对。没有变红。