I've added @types/jasmine
as a development dependency.
This is my gulp task for compiling TypeScript:
gulp.task('compile:tests', ['compile:typescript', 'clean:tests'], function () {
var project = ts.createProject('tsconfig.json', { typescript: typescript });
var tsResult = gulp.src(['spec/**/*spec.ts'])
.pipe(ts(project));
return tsResult.js
.pipe(gulp.dest('spec/'));
});
here's my tsconfig.json file:
{
"compilerOptions": {
"target": "es6",
"module": "commonjs",
"moduleResolution": "node"
},
"exclude": [
"node_modules"
]
}
However, I'm encountering these errors:
spec\linter.spec.ts(7,1): error TS2304: Cannot find name 'describe'.
spec\linter.spec.ts(8,3): error TS2304: Cannot find name 'it'.
spec\linter.spec.ts(17,5): error TS2304: Cannot find name 'expect'.
spec\linter.spec.ts(20,3): error TS2304: Cannot find name 'it'.
Is there a way to make TypeScript (being used by gulp-typescript) recognize the typings from @types/...
?