Answer the question
In order to leave comments, you need to log in
How to properly use TS in a monorep?
For example, there are 2 packages in the turnip, @company/core and @company/lol, each is rolled up in /dist/index.js.
in @company/core there is, for example, an interface /src/my-interface.ts, and in @company/lol I import it in this way, for example import Imu from "@company/core/src/my-interface"; then, after compilation in d.ts files, the import comes from src, and when publishing the src package, there will be no directory ..
you can, of course, compile and take from the types folder: Well, it's not very convenient, because you have to compile.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question