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

Move middleware codebase to TypeScript #1365

Open
Laurin-W opened this issue Feb 22, 2025 · 0 comments
Open

Move middleware codebase to TypeScript #1365

Laurin-W opened this issue Feb 22, 2025 · 0 comments

Comments

@Laurin-W
Copy link
Contributor

From a developer experience point of view, it can be extremely hard to know what the type of an object in a moleculer service might look like. Also, many service actions do not have parameter checks enabled.
With ldo that we are implementing soon, there will be improvements on that front as well.
Note that the frontend supports ts already.

Node 23.6 now supports type-stripping out of the box. Deno as a potential runtime alternative seems to be almost compatible out of the box. There are other approaches to running typescript too, among them tsx, swc, tsc.

There are a few things to consider:

  • We need to keep support for users of the framework that still use javascript.
  • Moleculer is javascript based. There is an open PR to improve type support. Maybe this is coming in v0.15 but we might as well take the PR and add the feature to the type namespace by ourselves for the time being.
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

1 participant