-
Notifications
You must be signed in to change notification settings - Fork 179
tsconfig "declaration": true
doesn't produce declaration files
#349
Comments
Same here... Can't get this to work with |
Yep. Trying to upgrade from 2.2.4 makes my .d.ts file almost empty... and 2.2.4 doesn't work with the latest typescript version: #293 |
pretty much having to run a separate gulp build just for the declarations; ts-loader isn't great either and cannot exlcude test files. :/ |
Hmm I was just about to add tests with ts-loader, are you sure about this @MeirionHughes ? |
isn't there a spec in ts that tells tsc to ignore a file, like naming with _test in the filename? |
rules: [ { test: /\.ts?$/, exclude: [ path.resolve(__dirname, "test")], loader:"ts-loader"], ... ... had no effect. I tried getting tsc to emit only the declarations, but that didn't work. In the end, it was simply easier to gulp it: var gulp = require('gulp');
var gulpts = require('gulp-typescript');
var typescript = require('typescript');
gulp.task('typings', () => {
var project = gulpts.createProject('tsconfig.json', {
typescript: typescript
});
return gulp.src(['src/**/*.ts']).pipe(project()).dts.pipe(gulp.dest('./lib'));
}); |
I did this with ts-loader in the same repo and it works(produces /src)
The text was updated successfully, but these errors were encountered: