I'm working with a bun monorepo using SST v3 and trying to figure out the best way to add TypeScript type-checking for my infra code. My infrastructure code is at the root of the repo, alongside sst.config.ts, and isn't part of a standard workspace package, so it's not covered by my existing typecheck setup.
I've tried creating a root tsconfig.json that includes sst.config.ts and infra/**/*.ts, but when I run tsc, I get a lot of type errors from the .sst/platform directory. It seems that even with skipLibCheck and various exclude patterns, TypeScript still follows the imports into the platform files and errors out on SST's internal code.
What is the recommended way to handle this? I'd like to have a clean tsc run in CI for my own code without checking all the SST internals. Is there a best practice for this type of setup?
I'm working with a bun monorepo using SST v3 and trying to figure out the best way to add TypeScript type-checking for my infra code. My infrastructure code is at the root of the repo, alongside
sst.config.ts
, and isn't part of a standard workspace package, so it's not covered by my existingtypecheck
setup.I've tried creating a root
tsconfig.json
that includessst.config.ts
andinfra/**/*.ts
, but when I runtsc
, I get a lot of type errors from the.sst/platform
directory. It seems that even withskipLibCheck
and variousexclude
patterns, TypeScript still follows the imports into the platform files and errors out on SST's internal code.What is the recommended way to handle this? I'd like to have a clean
tsc
run in CI for my own code without checking all the SST internals. Is there a best practice for this type of setup?