2017-07-30 19 views
1

で重複識別子「要素」エラー:活字体

{ 
    "compilerOptions": { 
     "module": "system", 
     "noImplicitAny": true, 
     "removeComments": true, 
     "preserveConstEnums": true, 
     "sourceMap": true 
    }, 
    "include": [ 
     "src/ts/*.ts" 
    ], 
    "exclude": [ 
     "node_modules", 
     "**/*.spec.ts" 
    ] 
} 

は、これが私のGulpfileです:

const gulp = require('gulp'); 
const sass = require('gulp-sass'); 
const ts = require('gulp-typescript'); 
const tsProject = ts.createProject('tsconfig.json'); 

const tasks = { 
    css:() => { 
     return gulp.src('./src/scss/*.scss') 
      .pipe(sass().on('error', sass.logError)) 
      .pipe(gulp.dest('./dist/css')); 
    }, 
    js:() => { 
     return tsProject.src() 
      .pipe(tsProject()) 
      .js.pipe(gulp.dest('./dist/js/')); 
    } 
}; 

gulp.task('js',() => { 
    tasks.js(); 
}); 

gulp.task('css',() => { 
    tasks.css(); 
}); 

これはエラートレースです:

$ gulp js 
[22:37:05] Using gulpfile ~/Development/proj/gulpfile.js 
[22:37:05] Starting 'js'... 
[22:37:05] Finished 'js' after 29 ms 
/Users/apple/Development/proj/node_modules/typescript/lib/lib.d.ts(7617,11): error TS2300: Duplicate identifier 'Element'. 
/Users/apple/Development/proj/node_modules/typescript/lib/lib.d.ts(7716,13): error TS2300: Duplicate identifier 'Element'. 
src/ts/main.ts(1,7): error TS2300: Duplicate identifier 'Element'. 
[22:37:07] TypeScript: 3 semantic errors 
[22:37:07] TypeScript: emit succeeded (with errors) 
Done in 3.76s. 

答えて

1

それ私がのElemElementクラスの名前を変更した後に動作します - Elementのように見えます。