首页 > 解决方案 > 使用 TypeScript 的 CreateJS

问题描述

我有这些错误,不知道如何解决。每次我尝试用 TSC 编译我的项目时,它都会抛出错误:

error TS2339: Property 'call' does not exist on type 'void'

在这行代码(调用方法):

createjs.Tween.get(this.clip).wait(this.clipDuration).call(this.endFrameScript.bind(this));

这个错误

error TS2339: Property 'to' does not exist on type 'void'

在这条线上(方法)

createjs.Tween.get(this.feedback).wait(1000).to({alpha:0},1000);

重写这些代码行以使其符合 Typescript 的最佳方法是什么?我们在哪里可以找到最新的 CreateJS d.ts 文件?发布在 DefinedTyped GitHub 上的 CreateJS d.ts (easeljs.d.ts) 错误太多。

谢谢

标签: typescriptcreatejs.d.ts

解决方案


推荐阅读