Skip to content
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

Move namespaces to more private names. #3400

Merged
merged 1 commit into from
Nov 24, 2019
Merged

Conversation

kitsonk
Copy link
Contributor

@kitsonk kitsonk commented Nov 24, 2019

Fixes #2888

This is effectively a temporary fix to #2888 until we restored the lib generation and address it longer term. All internal namespaces in the lib file have been moved to something that starts with __ to indicate their internal nature, so they are unlikely to "squat" on runtime code/variables.

Copy link
Member

@ry ry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Is it possible to reorganize lib.deno_runtime.d.ts such that these names are not used at all? EG: if we remove the namespaces - or move everything into a single _deno_internal namespace? This PR is certainly an improvement, but "__blob" will still be exposed to users. It would be good to eliminate or reduce the number of private symbols exported. That can help to serve as a target for future automation output.

@ry ry merged commit 9e97eb2 into denoland:master Nov 24, 2019
@kitsonk
Copy link
Contributor Author

kitsonk commented Nov 24, 2019

Is it possible to reorganize lib.deno_runtime.d.ts such that these names are not used at all? EG: if we remove the namespaces - or move everything into a single _deno_internal namespace? This PR is certainly an improvement, but "__blob" will still be exposed to users. It would be good to eliminate or reduce the number of private symbols exported. That can help to serve as a target for future automation output.

I am going to work on another PR that integrates directly into the compiler services and will try to do what is proposed in the conversations with TypeScript team about trying to flatten all the definitions. This should be a situation where there is only the global namespace and the Deno namespace.

rsp added a commit to rsp/deno-streams that referenced this pull request Jan 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Non-standard namespaces other than Deno declared in lib.deno_runtime.d.ts
2 participants