TypeStrong / dts-bundle

Export TypeScript .d.ts files as an external module definition
MIT License
308 stars 57 forks source link

Union Types breaking bundling #48

Open deegles opened 7 years ago

deegles commented 7 years ago

Hi, it looks like union types are breaking the bundling process.

original:

export type MyType = "a" | "b" | "c";

export const AnotherType = {

    One: "a" as MyType,

    Two: "b" as MyType,

    Three: "c" as MyType

};

Output (from the top of the file, there is a blank line first):

    One: "a" | "b" | "c";

    Two: "a" | "b" | "c";

    Three: "a" | "b" | "c";
};

I'll try to dig in more and see if I can find the bug, but could someone take a look?