I recently implemented a monorepo using npm's workspaces feature. Within this setup, I have two distinct applications that rely on an API residing in a separate repository. I am eager to share the typescript definitions of this API.
To achieve this, I created a "common" library within the monorepo for sharing code. While this works effectively for actual code sharing, I encountered an issue with the API definitions, which exist solely as d.ts files. These files are being ignored during the build process.
One solution I considered was writing class definitions in the common library and exporting them to the other applications. However, this is not as elegant as utilizing d.ts files. Are there any other approaches I could consider?