-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
Disallow module
keyword in new code where namespace
could be used?
#6808
Comments
We have shied away from syntactic breaking changes, specially here when the value is mainly cleanliness. We use tslint rule to flag these internally. We should reconsider though, and follow some depreciation process, similar to the 0.8/0.9 days with warning first with a flag to suppress the warning, and then erroring with a flag to allow the old syntax to finally removing it all together. |
Simply too much |
tslint is far from what new devs reach for, but I understand. Let's hope this is fixed in the new handbook atleast. |
Yep, if you see |
We occasionally get people who ask questions about modules and exports, and after some back-and-forth and sharing of code we realize they're mixing features of namespaces and (external) modules based on what they found from the handbook and other places on the internet.
Do you think it makes sense to report an error when using
module
wherenamespace
could be used instead, with a new--allowInternalModuleKeyword
compiler option for existing codebases? This will help steer new users in the right direction while still having minimal impact on existing codebases.The text was updated successfully, but these errors were encountered: