kittykatattack / ga

The world's tiniest, cutest and funnest game engine

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add Typescript support

bsorrentino opened this issue · comments

Hi

This is mostly a question. I would like to know if you are interested to add support for typescript language.

I've forked your project and, without change anything of your runtime js code, I have added typescript definitions in order to have for free type checking, intellisense, inline help etc .. Moreover I've converted tutorial and examples (see fork) (see typedoc generate doc)

If yes, I'll provide you the PR

Wow, that's amazing!!!
I wouldn't like to use Typescript in this main repo (it's all about minimalism), but we should definitely link to your fork in the docs.

(...Oh, and if anyone out there reading this would like to build an Elm (http://elm-lang.org) wrapper, please let me know!)

Thanks for the definition files @bsorrentino. Rather than adding it in the main repo, might I suggest to publish it in a separate package @types/Ga! ?

Ok

I’ll push to DefinitelyTyped for publishing as @types

Hi @kittykatattack referring to @Permagate request could I publish on npm ( ga-ts ) this package using the typescript definitions from my fork ?

Note

Keep in mind that I haven't changed your javascript implementation

@bsorrentino Yes, of course, go ahead!
Thanks for doing all that, it's amazing!

We should add a link to your fork on the README too.

-kk.

Thank you @kittykatattack for your amazing work ...

I've published project on npm.

@Permagate typescript definitions are embedded so, if you use npm to download project (npm i kka-ga ) it already works for typescript

Need to add /// <reference types="kka-ga" /> somewhere in the project in addition to installing kka-ga. It works well otherwise, thanks @bsorrentino!

@Permagate, that should be one way to use it.

Really I would wanted that definition was auto loaded for this reason I've followed the standard naming index.d.ts. But it seems not enough .. I'll try to figure out how to do it