I am trying to convert a project from Angular 1 to Angular 2.
This is a client and server project with some common code (so I keep it together). I want to use Angular 2 on the client side, so I executed ng2 QuickStart . I'm currently trying to create it inside my project.
I use TSDto manage my dependencies. Some of these dependencies, for example socket.io, rely on node.d.ts. My problem is that it angular2already expands node.d.tsand creates a definition of the environment, so when I want to use TSDwith angular2, I get a conflict between the two definitions:
typings\node\node.d.ts(961,9): error TS2300: Duplicate identifier 'path'.
Here is my gulp task:
gulp.task('build.conflict', function(){
var browserProject = tsc.createProject('browser.tsconfig.json', {
typescript: typescript
});
var src = [
'src/browser/**/*.ts',
'typings/**/*.d.ts'
];
var result = gulp.src(src)
.pipe(tsc(browserProject));
return result.js
.pipe(gulp.dest('build/browser'));
});
, .
, TSD . ( angular2, node.d.ts)