I have my types for a project in a separate codebase, because it's shared between multiple projects. I have the following directory structure in suman-types:
In my main project, I import suman-types, and in my main project's tsconfig.json file, I have this:
"compilerOptions": {
"declaration": true,
"baseUrl": ".",
"typeRoots": [
"./node_modules/@types",
"./node_modules/suman-types/dts"
],
I also tried this:
"compilerOptions": {
"declaration": true,
"baseUrl": ".",
"typeRoots": [
"./node_modules/@types",
"./node_modules/suman-types/dts/*"
],
unfortunately, the problem is that when I store the types in a different project and symlink that project to my main project, I can't get my main project to recognize the types and auto-import them as usual.
Does anyone know how to properly store types in a separate project?