Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Migrate to TypeScript #551
Comments
I'd like to start working on this, I have some experience with Ts, can you tell me which module is up for grabs? |
@yashshah1 You are welcome to contribute, please pick any module or portion for conversion and mention it here, so I can mark it in-progress (to avoid any duplication effort). |
I'd like to work on this too, any recommendations on where to start? |
@nabeelvalley here is the short guide, super simple to start. Please pick any module or portion for conversion and mention it here, so I can mark it in-progress (to avoid any duplication effort). Here you can find a guide on how to contribute. |
@mubaidr I'm working from the The tests seem to be failing when I convert the file to JS because it looks like Jest is running against the TS files instead of the compiled JS - has the TS Compile been configured? Looks like the tests are also currently failing:
It appears that the The data returned looks exactly the same, it's just that the object types are different so the deep equality is failing: Example for one of the tests below:
|
Yes, you can update test to expect In the mean-time some tests might still fail, because they have not yet been updated recently. You can can continue working and make sure build process is successful and conversion does not cause increase in no. of failed tests. |
Hi! I want to help. If I convert one file, do I need to convert related files too or something? Or just a single file? |
You don't need to updated all the related files, just go file by file and make sure build is successful. |
Utilities is taken, isnt it? |
Activation functions seem like a good place to start, may I work on it? |
Hi @HarshKhandeparkar, I haven't had a chance to work on this you're welcome to take utilities if you want, just note that needs to be updated above |
Np @nabeelvalley. I think I'll work on activation functions :) |
@nabeelvalley I think I managed to fix the jest error you were facing in #582. You may copy paste my changes to |
estimator/ has a single file. Looks like a nice |
I think I'll snipe some of the utilities next, if you don't mind @nabeelvalley. |
You would have probably started in alphabetical order(I am assuming), so I am going to start from the bottom. |
Going to snipe utilities/values* tonight :) |
Huzzah! |
Build systems seems to be broken, I am looking into this issue. |
Can I continue or should I wait? |
You should continue your contributions! I will try to fix it asap. |
@mubaidr |
We have following available:
|
#551 arthur-deviation-biases/end-to-end to ts
@mubaidr I'll be taking up |
Hey! Would like to pick up some work here. I can help with removing |
@shubhi23994 That would be great! You can run |
For anyone looking to contribute, here is the list of files that still needs typescript migration: |
Looks like childrens-book.js has already been converted. I'm going to convert https://github.com/BrainJS/brain.js/blob/370502c92ce228148524bc3bff95eac304a559a5/examples/javascript/predict-tense.js if that's not being worked on atm? |
I'm going to take a look at https://github.com/BrainJS/brain.js/blob/3b464186dbca121bd3e92845aa4e49ae71df61b5/src/neural-network.js too |
Hello again I'll give a shot at migrating https://github.com/BrainJS/brain.js/blob/master/src/recurrent/rnn.js |
@luisgregson @dhairyagada Please wait for input from @robertleeplummerjr I think he was working on these, if otherwise, you can then work on these, please. |
Yea, nearly done, but was away last week. Look for by end of week something for review. @dhairyagada I'd love to get your help on it, however. |
@mubaidr @robertleeplummerjr |
Sorry, neural-network.js is free, I am working on rnn.js. |
@luisgregson You can continue working on |
Sure @robertleeplummerjr , I would love to help! Please let me know how can I contribute to it |
I have pushed up the RNN changes to https://github.com/BrainJS/brain.js/tree/rnn-ts @dhairyagada. If you want to check it out. It is nearly complete in script conversion, but I've not tested it entirely yet. The typescript fails around serializing and deserializing from JSON. |
Sure @robertleeplummerjr I'll check it out |
Wow, this has made a lot of progress! Is there anything left where I can help? |
I've got rnn.ts nearly done, upgrades to the data-formatter.ts (because they are so heavily linked) and some minor fixes along with the to-svg.ts fixes. I even found a (semi naughty) way of fixing some weirdness we were seeing in equation.ts. I'll have them pushed tomorrow. |
We plan to gradually migrate brain.js to TypeScript, code base is pretty large, so we would love your help!💪
How to contribute?
Here you can find a guide on how to contribute.
Want to convert something, let us know in the comment and go ahead!😎
To avoid duplicate work please comment on which part you want to work on (as long as nobody else is working on it) so we can mark it as taken.
Reach out to us!
Feel free to reach if you have questions or need help getting started. You can leave comments here or you can tag me in your PR if you need any help or you're not sure about something!
You can also get in touch on our
&
.
Happy Coding!🤟
UPDATE:
Wohoooo!!!🎉
All files inside😊
src
directory are migrated to typescript. (Except few ones which are already taken up and being worked on), though we are still looking on improvements to types in these files and removingany
types from the source. You are welcome to contribute.__tests__
directory has still some files left that needs migration to typescript, so feel free to pick em up!UPDATE
For anyone looking to contribute, here is the list of files that still needs typescript migration:
https://github.com/BrainJS/brain.js/search?l=javascript&p=1