microsoft / TypeScript-Node-Starter

A reference example for TypeScript and Node with a detailed README describing how to use the two together.
MIT License
11.31k stars 2.77k forks source link

Why use module.exports over export #83

Closed aaroncolaco closed 6 years ago

aaroncolaco commented 6 years ago

In app.ts is there a reason to use

module.exports = {} 

over Typescript's

export {}
MPankajArun commented 6 years ago

Well, “exports” itself is never returned! It is just a reference to module.exports; a convenience variable to help module authors write less code.

peterblazejewicz commented 6 years ago

@aaroncolaco I've added PR with TS2.7 and ECMA script modules support enabled: #85

aaroncolaco commented 6 years ago

@peterblazejewicz awesome! Thanks.