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

amd reexport symbols #4004

Closed
druppy opened this issue Jul 23, 2015 · 1 comment
Closed

amd reexport symbols #4004

druppy opened this issue Jul 23, 2015 · 1 comment
Labels
Bug A bug in TypeScript Effort: Moderate Requires experience with the TypeScript codebase, but feasible. Harder than "Effort: Casual". Help Wanted You can do this
Milestone

Comments

@druppy
Copy link

druppy commented Jul 23, 2015

I have been trying the new reexport feature together with amd modules, and found a strange detail.

It seem like the compiler does not understand that the symbol need to be reexported. So this code :

/// <amd-dependency path="text!extern_view.html" name="view"/>
declare var view: string;

export {view};
export function test() {}

using the tsc --module amd ...

emits the following :

define(["require", "exports", "text!extern_view.html"], function (require, exports, view) {
    function test() {
    }
    exports.test = test;
});

here the function is exported but the imported amd module is totally ignored, and therefor not reexported.

If, I ... on the other hand make a variable using this export and the export this new value, it works as expected, like this :

/// <amd-dependency path="text!extern_view.html" name="view_tmp"/>
declare var view_tmp: string;

let view = view_tmp;
export {view};
export function test() {}

Is this a known issue or have I misunderstood the reexport idea ?

Regards

/BL

@mhegazy mhegazy added the Bug A bug in TypeScript label Jul 24, 2015
@mhegazy mhegazy added this to the TypeScript 1.6 milestone Jul 24, 2015
@mhegazy mhegazy assigned sheetalkamat and unassigned yuit Jul 31, 2015
sheetalkamat added a commit that referenced this issue Aug 10, 2015
@mhegazy mhegazy modified the milestones: TypeScript 1.7, TypeScript 1.8 Oct 9, 2015
@mhegazy mhegazy modified the milestones: TypeScript 1.8, TypeScript 2.0 Jan 7, 2016
@mhegazy mhegazy assigned yuit and unassigned sheetalkamat Sep 14, 2016
@mhegazy mhegazy modified the milestones: Future, TypeScript 2.1 Sep 29, 2016
@DanielRosenwasser DanielRosenwasser added Help Wanted You can do this Effort: Moderate Requires experience with the TypeScript codebase, but feasible. Harder than "Effort: Casual". labels Aug 3, 2017
@RyanCavanaugh
Copy link
Member

Closing due to lack of activity - presumed fixed or irrelevant by now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A bug in TypeScript Effort: Moderate Requires experience with the TypeScript codebase, but feasible. Harder than "Effort: Casual". Help Wanted You can do this
Projects
None yet
Development

No branches or pull requests

6 participants