question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Migrate to TypeScript

See original GitHub issue

We plan to gradually migrate brain.js to TypeScript, code base is pretty large, so we would love your help! 💪

How to contribute?

  • Convert a file from .js to .ts
  • Add types, fix all type errors.
  • Submit a PR! 🎉

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 Gitter & Slack.

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 removing any 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

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:3
  • Comments:136 (124 by maintainers)

github_iconTop GitHub Comments

5reactions
robertleeplummerjrcommented, Jan 13, 2021

With https://github.com/BrainJS/brain.js/commit/6c86dce270ae0a0414a85cced0ff3c24ac8f30cd I believe we are now a full on typescript library. Ty everyone for your hard work!

4reactions
robertleeplummerjrcommented, Oct 7, 2020

Starting on src/recurrent/rnn.js. What a bear!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Documentation - Migrating from JavaScript - TypeScript
At this point, you're probably ready to start using TypeScript files. The first step is to rename one of your .js files to...
Read more >
Migrating millions of lines of code to TypeScript - Stripe
On Sunday March 6, we migrated Stripe's largest JavaScript codebase (powering the Stripe Dashboard) from Flow to TypeScript.
Read more >
A simple guide for migrating from JavaScript to TypeScript
When migrating over to TypeScript, one basic thing to keep in mind is TypeScript files have a .ts extension instead of .js ....
Read more >
10 Strategies for migrating to TypeScript - Exploring JS
Start your migration with experiments: Play with your code base and try out various strategies before committing to one of them. · Then...
Read more >
How to Migrate Application From JavaScript to TypeScript
TypeScript is a superset of JavaScript, so valid JavaScript code is a valid TypeScript code. Incremental migration, converting the whole project step by ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found