简体   繁体   中英

Phaser.io and TypeScript

Looking through what Phaser.io documentation is out there, it seems that Phaser.io with TypeScript is a less popular idea. My thought is that I will be able to develop faster with the Visual Studio tools.

My question is, what are the technical advantages/disadvantages of using TypeScript vs raw JavaScript with Phaser.io?

There are no technical advantages / disadvantages imho. If you use TypeScript you'll indeed get things like code-completion and intellisense from Visual Studio, which are really useful. But equally you don't get in-line jsdocs appearing yet, so you may find you still need to do quite a bit of doc-searching and just trial-and-error, which may mitigate the extra development speed TS gives you.

Where I think you'll be at a slight disadvantage is that all of the examples we produced are in plain JavaScript, so you'd need to "translate" those to TS before they're any use to you. Also most of the devs in the forum will answer expecting that you're using JS instead of TS.

So to re-cap, I don't think there are any technical issues in picking TypeScript at all, but I do feel there are issues regarding the speed at which you learn Phaser. That's highly subjective of course :)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM