GeezerVison is showing github.com — Another try to not use namespace by ShuiRuTian · Pull Request #39344 · microsoft/TypeScript
Conversation
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
Question1:
namespace ts{
export const enum SyntaxKind {
Unknown,
EndOfFileToken,
SingleLineCommentTrivia,
MultiLineCommentTrivia,
NewLineTrivia,
}
}
var q = (ts as any).SyntaxKind;
const enum SyntaxKind {
Unknown,
EndOfFileToken,
SingleLineCommentTrivia,
MultiLineCommentTrivia,
NewLineTrivia,
}
// How to get SyntaxKind like under namespace?
For now I generate a new file and copy everything in need expect the "const" keyword.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
Some aim:
- remove all "ts" namespace, keep others for temp. (ts.XX keeps too)
- NOT change indent, so review could be possible.
- use script to do heavy work, but manually check all again and fix error.
Some sequelae caused by this branch:
- some variable are renamed, they are usually added "NameSpaceLocal" suffix.
- indent in some test files and their baseline are changed.
How to deal with namespace:
- for those which only have one (in another word, not merged)
- if it is used in multi projects, keep namespace and export it.
- if it is only used in one project, just delete the namespace and remove the namespace name in used place
- for those which have multi parts (merged)
How to do with it?
why importTracker.ts is not in findAllReference.ts?
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
Song Gao (@ShuiRuTian) FYI, #35561 already does this and is (re)generated by script. We're mostly just blocked on an API Extractor feature so we can preserve the same file layout in our API as today.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
whoops, glad to know that!
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
|