craftyjs / Crafty

JavaScript Game Engine
http://craftyjs.com
MIT License
3.39k stars 561 forks source link

Support typescript definitions #1196

Open starwed opened 5 years ago

starwed commented 5 years ago

AFAIK typecript now has enough support for things like mixins that it would be reasonable to use with Crafty, if we actually provided type definitions.

It might be possible to generate basic typing information along with our documentation generator. (Although we'd probably need to manually craft some fancy definitions for things like Crafty.c, since that actually defines a component.) We might have to default to any in a lot of places, but it's least worth a try. (And would provide another incentive to actually standardize and clean up the type information in our docs!)