stop typescript compiler from creating .d.ts files

Viewed 4623

I want typescript to not create .d.ts files when compiling. This is because it causes a "duplicate Identifier" error on all class names. I have added this to the tsconfig file:

{
    "compileOnSave": true,
    "compilerOptions": {
        "target": "es5",
        "noImplicitAny": true,
        "module": "system",
        "moduleResolution": "node",
        "sourceMap": false,
        "emitDecoratorMetadata": true,
        "experimentalDecorators": true,
        "removeComments": true,
        "outDir":"js/",
        "declaration": true
    },
  "exclude": [
    "bower_components",
    "node_modules",
    "wwwroot" // this is the key line
  ]  
}

This is supposed to make it stop creating .d.ts files as shown in this answer

But I guess that is not the folder that I need to exclude because excluding it doesn't stop it creating .d.ts files for me. I am using visual studio code. What file do I need to exclude?

1 Answers
Related