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

[Emit] Some import statements not emitted #46

Closed
mhegazy opened this issue Jul 17, 2014 · 1 comment
Closed

[Emit] Some import statements not emitted #46

mhegazy opened this issue Jul 17, 2014 · 1 comment
Assignees
Labels
Bug A bug in TypeScript By Design Deprecated - use "Working as Intended" or "Design Limitation" instead

Comments

@mhegazy
Copy link
Contributor

mhegazy commented Jul 17, 2014

In tests/cases/compiler/privacyTopLevelInternalReferenceImportWithExport.ts:

Everything declaration of the form:

im_public__private

or

im_public__public

is not emitted.

In tests/cases/compiler/privacyTopLevelInternalReferenceImportWithoutExport.ts:

Everything declaration of the form:

im_private__private

or

im_private__public

is not emitted.

For both cases, used to emit:

var im_private_c_public = m_public . c_public ;

and the like

@mhegazy mhegazy added this to the TypeScript 1.1 milestone Jul 17, 2014
@ahejlsberg
Copy link
Member

The only difference I see is that the new compiler doesn't generate an (otherwise unused) local variable for an exported import statement. Specifically, given:

export import a = b;

the old compiler would generate:

var a = b;
exports.a = a;

where the new compiler simply generates:

exports.a = b;

Both compilers rewrite all references to a into exports.a so the new scheme definitely seems better.

@microsoft microsoft locked and limited conversation to collaborators Jun 18, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug A bug in TypeScript By Design Deprecated - use "Working as Intended" or "Design Limitation" instead
Projects
None yet
Development

No branches or pull requests

3 participants