R
R
Roman2015-03-24 16:03:21
JavaScript
Roman, 2015-03-24 16:03:21

How to set up TypeScript compilation using jquery.d.ts?

Hello!
Faced with the following problem.
I have WebStorm and in it a simple angular + TypeScript
project is built using gulp.
I pull declaration files (*.d.ts) using https://github.com/DefinitelyTyped/tsd
Actually, I have two of them in my project: angular.d.ts, jquery.d.ts
When I build the project, I get this error:

E:/MyProjects/20150323__typescript/bower_components/dt-angular/angular.d.ts(13,5): 2300 Duplicate identifier '$inject'.
Error in plugin 'gulp-typescript'
Message:
    E:/MyProjects/20150323__typescript/bower_components/dt-angular/angular.d.ts(13,5): 2300 Duplicate identifier '$inject'.
E:/MyProjects/20150323__typescript/bower_components/dt-jquery/jquery.d.ts(28,5): 2300 Duplicate identifier 'accepts'.
Error in plugin 'gulp-typescript'


I use:
"gulp-typescript": "~2.3.0"
"gulp-typescript-compiler": "^1.0.1",
"typescript": "^1.4.1"

What can I do?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question