-
Notifications
You must be signed in to change notification settings - Fork 13k
Replace all testcase instances of 'module' with 'namespace' #62399
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This pull request replaces all instances of the module
keyword with namespace
in TypeScript test case baseline files. This change is preparatory work for a future PR that will deprecate the module foo {
syntax in favor of the namespace
keyword, which is the modern and preferred way to declare internal modules in TypeScript.
Key Changes:
- Systematic replacement of
module
declarations withnamespace
declarations across test baseline files - Updated line numbers and symbol references in baseline files to reflect the keyword length change (3 additional characters)
- No functional changes to TypeScript behavior, only syntax modernization in test files
Reviewed Changes
Copilot reviewed 300 out of 5766 changed files in this pull request and generated no comments.
File | Description |
---|---|
Multiple .types files | Updated type checking baselines with namespace replacing module declarations |
Multiple .symbols files | Updated symbol resolution baselines with adjusted line numbers due to keyword change |
Multiple .js files | Updated JavaScript compilation output baselines showing namespace syntax |
Multiple .errors.txt files | Updated error message baselines with corrected line references |
Output of |
// https://github.com/microsoft/TypeScript/issues/7840 | ||
|
||
declare module chrome.debugger { | ||
declare namespace chrome.debugger { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if they still use module
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Searching github shows no results other than this test.
Do we have unit tests which hit this? |
We have a few, |
Right, I didn't see them in the gist, so wasn't sure if they were intentionally missing or just out of scope for this already mega-big-large PR. Probably best to do it elsewhere. |
Setting this up so that the incoming "deprecate
module foo {
" PR has a more reasonable diffIf anyone knows which tests are intentionally doing this let me know, otherwise we can just add a handful more in the implementation PR