hanyeah 专注于AS

使用Typescript开发基于createjs的项目

稍微大一点的项目,使用TypeScript开发比用纯js开发方便多了,维护起来更是方便。

目前经常用到的js库主要是egret、createjs、pixijs,egret自带工具就是用TypeScript的,pixi使用TypeScript可以参考这里TypeScript入门-03-使用js库,createjs使用TypeScript和pixi李阳,无非就是找一份.d.ts文件。

真的已经有人写好了:https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/createjs/createjs.d.ts

可以cd到一个目录下,然后使用tsd install createjs来下载。我是直接手动下载的。

https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/createjs-lib/createjs-lib.d.ts

https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/easeljs/easeljs.d.tseaseljs/easeljs.d.ts

https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/tweenjs/tweenjs.d.tstweenjs/tweenjs.d.ts

https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/preloadjs/preloadjs.d.tspreloadjs/preloadjs.d.ts

https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/soundjs/soundjs.d.ts



2016年8月25日 | 发布:hanyeah | 分类:TypeScript | 评论:0

发表留言: