Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeScript Support? #587

Open
leventkaragol opened this issue Jun 25, 2023 · 9 comments
Open

TypeScript Support? #587

leventkaragol opened this issue Jun 25, 2023 · 9 comments
Assignees

Comments

@leventkaragol
Copy link

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

@communix communix self-assigned this Jun 26, 2023
@communix
Copy link
Collaborator

communix commented Jul 1, 2023

@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.

@pclokcer
Copy link

if we build typescript to javascript, I think it will work ? @communix

@communix
Copy link
Collaborator

communix commented Aug 6, 2023

@pclokcer Yes. it works and you can publish it to public (https://kalumajs.org/packages/) and other people can use it.

@samboylett
Copy link

samboylett commented Oct 15, 2023

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!

@jt000
Copy link

jt000 commented Dec 9, 2023

@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

@jt000
Copy link

jt000 commented Dec 13, 2023

@niklauslee or @communix, would you be interested in co-owning the typescript definition files in DefinitelyTyped with me? DefinitelyTyped/DefinitelyTyped#67850 (comment)

@niklauslee
Copy link
Member

@jt000 Wow this is amazing contribution👍. I'm difficult to contribute or maintain.😥

@jt000
Copy link

jt000 commented Dec 31, 2023

@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?

@leventkaragol
Copy link
Author

Thanks, I'll take a look

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants