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 update #80

Closed
erikyo opened this issue Mar 23, 2024 · 4 comments · Fixed by #81
Closed

Typescript update #80

erikyo opened this issue Mar 23, 2024 · 4 comments · Fixed by #81

Comments

@erikyo
Copy link
Collaborator

erikyo commented Mar 23, 2024

Hey everyone,

I wanted to share a project I've been working on – a module designed to handle strings gathered by the parser, which incidentally was also developed by me. The purpose is to consolidate these strings into a cohesive 'set of blocks,' a process facilitated by your module.

I've found your module to be incredibly useful in my workflow, but I have a small suggestion for improvement. I think it would be fantastic if it were implemented in TypeScript, with the types directly provided within the npm module, similar to how it's done in gettext-merger here.

Adding TypeScript support and providing types within the npm package would greatly enhance its usability and compatibility with modern development practices. if some form of support or help is required I am here, I volunteer 😀

Looking forward to your thoughts on this!

ps I read an issue about 'comments', I think he was referring to the comments of the individual translation block and the fact that it is not optional not the fact that he wanted it removed

@smhg
Copy link
Owner

smhg commented Apr 4, 2024

Thank you @erikyo. And sorry about the late reply.
I can barely read TypeScript so I'm not the right person to ask. However, I think it would be great if this project had more contributors. Would you be able to create a PR with the absolute minimum necessary? We can then look how we proceed from that point onwards?

My only worry is TypeScript raised the bar for contributions (incl. myself). But if you can provide a proof of concept, I'd be very happy to consider it.
Or you think adding types in an external repo is an workable option?

@erikyo
Copy link
Collaborator Author

erikyo commented Apr 4, 2024

Yes, of course, I'll try to create a bare minimum PR as soon as possible with just what's necessary to use TypeScript instead of JavaScript 🎉.

Regarding the complexity, it's true that TypeScript might be slightly more "complex" than JavaScript, but it's a step that can be tackled in a short amount of time, and imho the benefits are significant, especially for these kind of repositories/modules.

Adding types externally can help those who will use the repository, but it doesn't provide all the advantages of using proper TypeScript (e.g. type checking). In that case i would prefer this way in order to allow the ts checks/types with javascript files.

@smhg
Copy link
Owner

smhg commented Apr 5, 2024

I fully support a JSDoc sollution if possible. Would you be ok to create a PR that way?

@erikyo
Copy link
Collaborator Author

erikyo commented Apr 30, 2024

superseded by #82

@erikyo erikyo closed this as completed Apr 30, 2024
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

Successfully merging a pull request may close this issue.

2 participants