This is because of the combination of two things:
-
tsconfignot having anyfilessection. From http://www.typescriptlang.org/docs/handbook/tsconfig-json.htmlIf no “files” property is present in a tsconfig.json, the compiler defaults to including all files in the containing directory and subdirectories. When a “files” property is specified, only those files are included.
-
Including
typescriptas an npm dependency :node_modules/typescript/This means that all oftypescriptgets included …. there is an implicitly includedlib.d.tsin your project anyways (http://basarat.gitbook.io/typescript/content/docs/types/lib.d.ts.html) and its conflicting with the one that ships with the NPM version of typescript.
Fix
Either list files or include explicitly https://basarat.gitbook.io/typescript/project/compilation-context/files 🌹