docs: document why we have two tsconfigs

This commit is contained in:
zkldi
2022-04-25 08:32:45 +01:00
parent 4d0b535121
commit fa06eb3158
2 changed files with 15 additions and 7 deletions
+7
View File
@@ -1,3 +1,10 @@
// This TSConfig file is used when pnpm build is ran. It omits out
// unecessary files, such as anything involved in testing.
// This is a separate TSConfig file because VSCode (by default) uses
// the exclude list to find out what it should care about for typechecking
// while writing code.
// Since I still want my tests to take advantage of static typing, this is
// a necessary hack.
{
"extends": "./tsconfig.json",
"exclude": [
+8 -7
View File
@@ -1,16 +1,17 @@
// NOT A REAL TSCONFIG FILE
// THIS IS USED FOR VSCODE SO IT INTEGRATES NICELY
// IF YOU USE THIS TO BUILD, IT WILL ALSO BUILD THE TEST FILES!!
// SO, DONT DO THAT, USE TSCONFIG.BUILD.JSON FOR THE BUILD.
// This is a base TSConfig for nice integration with IDEs such as VSCode.
// By default, VSCode reads `tsconfig.json` to know what it should typecheck
// in the editor. Since we want it to typecheck things like our tests, but
// we want to save disk space by not compiling them at runtime, we need two
// tsconfigs!
{
"compilerOptions": {
"target": "ES2020",
"module": "CommonJS",
"lib": [
"ES2019",
// this is absolutely stupid, and only needed because the AWS SDK
// DEPENDS ON A DOM TYPE???
// do people even run the aws sdk on the dom?
// This is necessary because -- for some unknown reason -- the AWS SDK
// depends on the DOM. Do people even run the AWS SDK in the browser?
// I hope not.
"DOM"
],
"declaration": true,