-
Notifications
You must be signed in to change notification settings - Fork 6
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
convert all require() statements to import statements #410
Comments
I got to a commit point, but I don't want to push at 5pm. I will discuss with @samreid tomorrow morning. Next steps:
|
|
|
This reverts commit eef3ea9.
We opened this issue when we thought that converting to es modules may be a stepping stone to convert to typescript. We now see that actually converting to TS and running through tsx is a stepping stone to es modules. ES modules are very strict, and setting For now we should close this, and in the future, when the time is right, an "ES Module full conversion" issue should be opened and accomplished. A couple more TODOs and checkboxes for refactoring is all that is left here. |
Some notes, just in case:
|
All has been handled here. Closing |
While working on #403, it became clear that a large amount of overhead to convert one file to typescript will be converting each spot where that module is used to an import statement, or use
require(...).default
. This is less than ideal. So we would like to experiment with converting all require statements over to imports.This also boosts typescript support since require() often provides the import as an "any" type.
The text was updated successfully, but these errors were encountered: