You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Previously some namespace types were generated using the legacy `module` keyword from ten years ago. Now we emit the modern TS `namespace` keyword that has been the preferred keyword since TypeScript 1.5 in 2015.
Please review the resulting diff for the generated `dist/index.d.ts` file: https://gist.github.com/robpalme/a320dc3f0cb50bcd14962bca46827dae/revisions
Note that the outer _Ambient Module Declaration_ intentionally remains untouched because it is not a namespace. These are differentiated by using a quoted string rather than a bare identifier
`module "quoted" {`
vs
`module bare {}`
---
Background: This usage of the legacy keyword was found by [a TypeScript real-world test suite](microsoft/TypeScript#61450 (comment)) that checks the compatibility of proposed changes. Using the `module` keyword for namespaces is [proposed for deprecation in TypeScript 6.0](microsoft/TypeScript#54500 (comment)) so it's worth getting ahead of this.
0 commit comments