Hey @sangheestyle, we keep “meeting” each other on typescript issues
So for your shared types we need to do a few things:
- Put your shared types at the root of the project (makes sense right?), maybe in
@types
at the root
You can call this folder whatever you like ofcourse, just add the same folder to your includes - Modify your
web/tsconfig.json
andapi/tsconfig.json
by adding this to your includes:
"include": [
"src",
"../.redwood/**/*",
+"../@types"
]
- Restart TS server in vscode. And your new types should now be available on both web and api sides!
Hope this solves your problem!
PS: Are you building anything cool? Would love to hear a bit more if you’re willing to share