I would like to build a TypeScript project (in Visual Studio) with the following automatic steps:
- compile each
.ts file as an AMD module, separately - link each generated
.js file to webpack, in release/my-app.js
As part of step 1, .d.ts files .d.ts also created for each .ts file (in addition to the Javascript output files). How can I combine these definition files together to provide type definitions for what is included in the output file my-app.js ?
project layout
MyApp |-- lib | |-- foo.ts | |-- foo.js | |-- foo.d.ts | `-- ... |-- release | `-- my-app.js |-- main.ts |-- main.js |-- main.d.ts `-- webpack.config.js
webpack.config.js
module.exports = { context: __dirname, entry: './main.js', output: { path: path.join(__dirname, 'release'), filename: 'my-app.js' } }
source share