-
Notifications
You must be signed in to change notification settings - Fork 59
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
Support for TypeScript #37
Comments
@tanayseven sounds good. What does TypeScript support involve? Can you give me a brief overview of what would need to be added to the codebase? |
The major addition would be a type declaration file. For more details please refer the documentation The changes can either be done in two ways. First is in this repo which means that this repo will be self sufficient when it comes to typescript. The other way would be to add the type declarations in the Definitely Typed repo. Which means that library consumer will have to install two separate repositories. |
@tanayseven thank you. Let me have a think about the tradeoffs. |
Hey @chr15m, did you get a chance to decide on whether to go ahead or not based on the tradeoffs? |
@tanayseven where can I find in the documentation which packages will need to be added to the |
@chr15m I think all you need is the |
@tanayseven if it can be done without adding |
I think it should be possible without the |
I'll be busy for a couple of weeks, requesting you to keep this issue open till I return |
@tanayseven no trouble, happy to leave the ticket open. Thanks for looking at it. |
I was trying to add types to my personal project which I will later transfer to the bugout repo.
Is there a cyclic dependency in the implementation of bugout? |
Can you output it to the browser console and inspect it there? The referencing cycle you're referring to appears to be in the WebTorrent library, not Bugout, and I don't think they would consider that a bug. |
Sorry, I removed that code while trying something else, so I'm unable to reproduce it. As of now assume that issue does not exist. I'll go ahead with adding the type definitions till then. But as far as I remember, the error looked exactly like the text that I've posted above. Since I was trying it in Svelte. |
Let me know how I should test it before merging. |
You might be able to use the |
Things are a bit stressful in my country, India. It will take a while for me to contribute to this. It's currently hard for me to take time out for doing this. |
@tanayseven I completely understand and please do not feel any obligation to work on this ticket. |
Thanks a lot |
Need this too |
@zisra patches welcome! |
@chr15m there's already an open PR though. There's some things missing to it, should I open a new one? |
@zisra whatever is easiest for you. I know nothing about typescript and I think the original contributor does not have capacity to take it further. |
Typescript is worth the trouble of a migration. Tried today to start a refactor of the lib that uses typescript. In typescript side , whatever we write in the code , it should be defined and makes some meaning somehow , while Js let us to write more arbitary code. @chr15m tomorrow i ll push the current version in my fork , if you want to elaborate to fix those issues there , and see what im talking about.. |
I really want TypeScript support for Bugout. I'm willing to add it and raise a PR. Do you think I should raise PR in this repo? Or should I raise PR in the Definitely Typed repo?
The text was updated successfully, but these errors were encountered: