ToddThomson / tsproject

Typescript minifier and modular typescript bundle optimizer for gulp (Ts Vinyl Adapter).

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Possible imports issue

niemyjski opened this issue · comments

I am using the ambient definition via the resolved package typings (https://github.com/csnover/TraceKit/blob/master/tracekit.d.ts). TraceKit is a global instance (like $) that is always initialized. I can import it and everything compiles in my project like

import {TraceKit, StackTrace} from 'TraceKit' and all is well.

However, after compiling the project I get

-TraceKit.report.subscribe(processUnhandledException);
-TraceKit.extendToAsynchronousCallbacks();

+TraceKit_1.TraceKit.report.subscribe(processUnhandledException);
+TraceKit_1.TraceKit.extendToAsynchronousCallbacks();

I expected StackTrace to be resolved as a interface definition and it is. I also expected TraceKit to be using the declared var but it's not, it's acting like a type.

I'm trying to figure this out, if you want to take a look at the branch it would be greatly appreciated if you have any ideas.

I've narrowed this down to you must export every function on the root as export declare var and export declare function