npm install --save-dev @types/node@4.0.21-alpha
{
"compilerOptions": {
"noImplicitAny": true,
"strictNullChecks": true,
"moduleResolution": "node",
"pretty": true,
"allowSyntheticDefaultImports": true,
"skipDefaultLibCheck": true,
// output options
"outDir": "dist/",
"rootDir": "./src",
"module": "commonjs",
"target": "es6",
"declaration": true,
"sourceMap": true,
"inlineSources": true
},
"files": [
"src/index.ts",
"node_modules/@types/node/index.d.ts"
]
}
11:24:25 PM - File change detected. Starting incremental compilation...
13 stack?: string;
~~~~~
node_modules/@types/node/index.d.ts(13,5): error TS2300: Duplicate identifier 'stack'.
883 stack?: string;
~~~~~
node_modules/typescript/lib/lib.es6.d.ts(883,5): error TS2300: Duplicate identifier 'stack'.
TypeScript Version:
1.9.0-dev.20160521-1.0
Code
Install node d.ts file:
index.ts:
tsconfig.json:
Expected behavior:
the build should work
Actual behavior:
tsc errors with:
// @RyanCavanaugh