-
Notifications
You must be signed in to change notification settings - Fork 49
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
refactor!: convert to TypeScript #1171
Conversation
This pull request has merge conflicts that must be resolved before it can be merged. |
Hey @NiedziolkaMichal! If you're down to rebase this, I'd be happy to get this merged shortly! |
Ack, looking at the test results, looks like a little more work is needed!
This pull request has merge conflicts that must be resolved before it can be merged. |
@queengooborg There are some conflicts. Would you mind taking a look at those? PS: I'm not sure, why the tests don't run on this PR. 😕 |
They have been fixed now!
I think that was just a fluke; they're running on the latest commit it looks like. |
@queengooborg Unfortunately, the tests are not passing yet. I'd be okay with |
Converting the Webpack config to TypeScript causes more issues than it solves. Additionally, the Webpack documentation doesn't mention anything about using a .ts file for the configuration in its TypeScript guide.
d06a112
to
1d4316d
Compare
This reverts commit a74976b.
Alright, so I've finished adding the remaining typedefs to the files and resolving TypeScript errors. I'm successfully able to run BoB and have had no problems with the interactive examples BoB hosts. I'm also successfully able to build and test BoB. However, it appears that building BoB from within |
This pull request has merge conflicts that must be resolved before it can be merged. |
@queengooborg It looks like 981875d did the trick, at least for running bob in the context of interactive-examples. |
As for the failing puppeteer test, I can reproduce this locally on http://127.0.0.1:4444/pages/js/array-concat.html, it looks like the JS editor does not get initialized: The DevTools don't show any console or network errors (apart from |
Hmm, I wasn't able to reproduce the issue locally until now -- I'll see if I can fix it! |
Ah, figured out what it was and was able to fix it! I also added debugging logging to announce when such a case occurs again. |
Awesome work, @queengooborg! 🙌 |
Thanks to @NiedziolkaMichal as well! Super excited for this to land! |
Oh yes, sincere apologies, @NiedziolkaMichal indeed started this initiative, laying the most important groundwork and @queengooborg polished it and brought it over the finish line. Nice collaboration, glad to see this work accomplished! 🎉 |
This PR changes all
.js
files ineditor/js
to.ts
and adds a minimum amount of necessary changes to remove basic errors, so it is easier to be reviewed..eslintrc.json
were done because importing other modules was throwing an error. The same thing is done in refactor(lib): add types #1164async function () {}.constructor;
to the version withObject.getPrototypeOf
because errorThis expression is not constructable. Type 'Function' has no construct signatures.
was being thrown.handleChoiceEvent
because the replacement is easier to be understood and we don't need to rely on this.