GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Another try to not use namespace by ShuiRuTian · Pull Request #39344 · microsoft/TypeScript

Conversation

@ShuiRuTian

@ShuiRuTian Song Gao (ShuiRuTian) commented Jun 30, 2020

Copy link
Copy Markdown
Contributor

Fixes #

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Song Gao (ShuiRuTian) added 8 commits June 28, 2020 18:57
@ShuiRuTian
draft of draft
180c9c8
@ShuiRuTian
protoType - 1
e396e8f
@ShuiRuTian
try to remove "ts."
cb29c45
@ShuiRuTian
prototype-2
097567c
@ShuiRuTian
prototype -3
c527f4d
@ShuiRuTian
update
8682905
@ShuiRuTian
change test case to avoid ^namespace
b1a1e90
@ShuiRuTian
add namespacelike folder.
f1adc1d
@ShuiRuTian

Song Gao (ShuiRuTian) commented Jul 1, 2020 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor Author

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ShuiRuTian

Song Gao (ShuiRuTian) commented Jul 1, 2020 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor Author

Some aim:

  1. remove all "ts" namespace, keep others for temp. (ts.XX keeps too)
  2. NOT change indent, so review could be possible.
  3. use script to do heavy work, but manually check all again and fix error.

Some sequelae caused by this branch:

  1. some variable are renamed, they are usually added "NameSpaceLocal" suffix.
  2. indent in some test files and their baseline are changed.

How to deal with namespace:

  1. for those which only have one (in another word, not merged)
    1. if it is used in multi projects, keep namespace and export it.
    2. if it is only used in one project, just delete the namespace and remove the namespace name in used place
  2. for those which have multi parts (merged)
    How to do with it?

why importTracker.ts is not in findAllReference.ts?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ShuiRuTian
prototype - 4
2afe126
@weswigham

Wesley Wigham (weswigham) commented Jul 1, 2020

Copy link
Copy Markdown
Member

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ShuiRuTian

Song Gao (ShuiRuTian) commented Jul 1, 2020

Copy link
Copy Markdown
Contributor Author

whoops, glad to know that!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ShuiRuTian Song Gao (ShuiRuTian) closed this Jul 2, 2020
@ShuiRuTian
Song Gao (ShuiRuTian) deleted the try-not-use-namespace branch July 6, 2020 13:44
@microsoft Microsoft (microsoft) locked as resolved and limited conversation to collaborators Oct 21, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

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.

2 participants

@ShuiRuTian @weswigham
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.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.