4 ms·
Another consideration is that it only works if all the code agrees on tsconfig settings (e.g. strictness settings and path resolution). That can work in a mono
by evmar 6y ago
Another consideration is that it only works if all the code agrees on tsconfig settings (e.g. strictness settings and path resolution). That can work in a monorepo but won't work if you mix libraries.
- mirekrusin 6y agoYes, they mention taking over tsconfig management because even generated .d.ts files are sensitive to tsconfig - article mentions type being different depending on the tsconfig setting. But in general publishing the most strict ts should work fine when using from weaker tsconfig. Personally I don't use custom path resolutions, can't comment on that. ps. oh wait, but why does it matter? .d.ts file won't be different if you change strictness in tsconfig - why would it make difference for published .ts files?
- evmar 6y agoSuppose project B uses lax tsconfig settings. Now suppose strict project A imports from B. If A uses B via d.ts it may be ignorant of most of B's choices. But if A uses B as source, A's strictness settings will now attempt to apply to B.
- mirekrusin 6y agoBut you can use compiler option skipLibCheck, right?