Open leventkaragol opened 1 year ago
@leventkaragol Sorry we don't have a specific plan to support Typescript now. Kaluma basically use JerryScript as a Javascript engine. So if Jerryscript support it we can consider it but no plan so far.
if we build typescript to javascript, I think it will work ? @communix
@pclokcer Yes. it works and you can publish it to public (https://kalumajs.org/packages/) and other people can use it.
We don't need JerryScript to support it. Same way we transpile TypeScript to JavaScript for web we can do for kaluma. Really all we need is a declaration file for the in built modules/constants. I've been building one up myself but it would be good to have an official one.
Actually looking at the source code all of this is already in javascript, so if we can convert it to typescript we can get declaration files for it (and transpile back to JS for JerryScript to use)
Happy to put in a PR for JS -> TS by the way!
@samboylett, I started the process of creating a type definition for Kaluma in DefinitelyTyped. Still quite a few components left to do, but got a good start on many of them... Also added template site for seeing how it can be easily used at jt000/kaluma-typescript-demo
@niklauslee or @communix, would you be interested in co-owning the typescript definition files in DefinitelyTyped with me? https://github.com/DefinitelyTyped/DefinitelyTyped/pull/67850#discussion_r1423149517
@jt000 Wow this is amazing contribution👍. I'm difficult to contribute or maintain.😥
@leventkaragol, I've been using typescript\webpack with Kaluma pretty successfully with the solution provided in https://github.com/jt000/kaluma-typescript-demo... Does this satisfy your typescript needs?
Thanks, I'll take a look
Any plans on typescript support? I'm not talking about directly loading typescript files with flash. But at least some type support like @types/kaluma would be nice