TypeStrong / tsify

Browserify plugin for compiling TypeScript
344 stars 75 forks source link

Tsify generates own import types (type_1 instead of type) and uses these types in ts transformed code #272

Closed Pryanishnik closed 3 years ago

Pryanishnik commented 3 years ago

I try to compile few ts classes to single js file and use it as js lib in browser. Right now I faced the problem that if I have

ClassA{
   someField: ClassB;
}

tsify converts it to var ClassB_1= require("./ClassB"); and also exports ClassB but doesn't use it in code like

ClassA{
   someField: ClassB_1;
}

Where did I make mistake?