Saturday, 10 June 2017

Export default const with Typescript

I have this in a TS file:

exports.default = module.exports;

(This is to support both Node style and TS style imports.)

Is there a way to create the above line of code with pure TS instead of JS?

I tried this:

export default const = module.exports;

and that does not transpile.



via Alexander Mills

No comments:

Post a Comment