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

Port Glee to TypeScript #144

Closed
panwauu opened this issue Oct 15, 2021 · 6 comments · Fixed by #213
Closed

Port Glee to TypeScript #144

panwauu opened this issue Oct 15, 2021 · 6 comments · Fixed by #213
Labels
enhancement New feature or request released

Comments

@panwauu
Copy link
Contributor

panwauu commented Oct 15, 2021

Reason/Context

As the spec already defines all the types and schema regarding the communication, Glee misses out on a lot of benefits that typescript could provide here. After all typescript was also written with a smiling developer in mind 😄.

Description

Porting to typescript will require large changes in the codebase. Each js file will have to be touched and also the execution process has to be altered (Either using ts-node or typescripts tsc). Since no tests exist it is going to be hard to ensure the behavior does not change and no bugs are introduced.

Approach

?

@panwauu panwauu added the enhancement New feature or request label Oct 15, 2021
@panwauu
Copy link
Contributor Author

panwauu commented Oct 15, 2021

I am willing to contribute but am not familiar with the repo and also did not port such a large codebase to typescript before. I always started with typescript from the start.
What do you think? How we could structure the change?
How do we approach the step-by-step change?
Ts-node or typescript compilation?
Should we write tests first to ensure everything runs just fine?

@fmvilas
Copy link
Member

fmvilas commented Oct 15, 2021

Glee misses out on a lot of benefits that typescript could provide here.

Would you mind expanding on those benefits? I'm all for porting it to TS but want to make sure we make reasonable decisions.

Should we write tests first to ensure everything runs just fine?

Since this library is still in its early days, I think it's just fine to port it and then add tests. Let's not make tests become a bottleneck.

@panwauu
Copy link
Contributor Author

panwauu commented Oct 16, 2021

The main benefit of typescript is the type checking during compile time. In my eyes this can avoid many errors during runtime.
Typescript can also let us infer types from the AsyncApi document and ensure we comply with them and provide a better developer experience by autocompletion.

@fmvilas
Copy link
Member

fmvilas commented Oct 21, 2021

I'm sold 😄 Do you want to champion this issue? I'm sure @jonaslagoni can lend a hand if needed 😄

@boyney123
Copy link

Should we write tests first to ensure everything runs just fine?

Yeah think this might help us now and also going forward for sure.

How do we approach the step-by-step change?

I'm happy to help here, just need some time to review the code and see how things are structured, then we can get a plan together?

@asyncapi-bot
Copy link
Contributor

🎉 This issue has been resolved in version 0.7.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request released
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants