This repo is to demonstrate the potential issues when distributing typescript source code vs compiled js code with d.ts files.
npm i -g [email protected]
Module 1 is built WITHOUT strict compiler options.
tsc -p module-1/tsconfig.json
Module 2 is built WITH strict compiler options.
Module 2 depends on Module 1 and uses the js file + d.ts.
This works because the compiler doesn't type check the JS file, just the d.ts file
tsc -p module-2/tsconfig.json
Module 3 is built WITH strict compiler options.
Module 3 depends on Module 1 and uses the source Typescript code
This fails because the compiler needs to compile the source code of Lib 1 which was written with less strict options in mind.
tsc -p module-3/tsconfig.json