#monorepo-wide ambient modules when using references

3 messages · Page 1 of 1 (latest)

trim badger
#

Currently trying to convert a monorepo with a single tsconfig.json to one using project references.
I've read through the docs but I can't figure out where to put ambient modules (e.g. declare module '*.svg') that are used repo wide.
Before, we had multiple files holding these that we always included in the compilation with include. However, if a composite tsconfig.json extends that root config, all include are overwritten with the ones the the tsconfig.json of the composite.
What's currently the best way to say "include these files AND the ones in a shared tsconfig.json"?

wise agate
#

Hi @trim badger, I’m Alexander Lill (a real person), a researcher at the University of Zurich. I’m trying to help people receive answers faster on Discord. If you are not ok with me trying to help you, click the 🚪 symbol, and I will delete this message and apologize for the inconvenience.

#

Based on your question, I suggest the following links. Please click the number-emoji for each link that was helpful for you, and on the ❌ if none of the links was helpful for you.

1️⃣ Extend a "paths" tsconfig file for a monorepo
https://stackoverflow.com/questions/59256368

2️⃣ Project references in tsconfig and ambient declarations
https://stackoverflow.com/questions/53543539

3️⃣ How to share a global.d.ts from several packages in monorepo
https://stackoverflow.com/questions/71517082

Let me know if you have any questions! More info: #1063200184315674706