wasp-lang / wasp

The fastest way to develop full-stack web apps with React & Node.js.
https://wasp-lang.dev
MIT License
12.76k stars 1.14k forks source link

Use a subset of `strict: true` in the SDK #2010

Closed sodic closed 1 month ago

sodic commented 2 months ago

Building the SDK generates two kinds of files:

Declaration files (d.ts) are subject to our user's tsconfig.json which is more strict than sdk/wasp/tsconfig.json used to build the SDK. This results in the SDK's declaration files having type errors when looked at from the user's perspective (e.g., during go-to-definition jumps).

We've avoided using strict: true in the tsconfig.json we use for building the SDK due to legacy reasons (old JS or improperly typed code that still works).

This is not a big problem, but definitely isn't ideal:

Since the strict: true compiler flag is a shorthand for multiple more specific flags, we should activate all the "subflags" that don't require a major refactor of the SDK. After that's done, we can tackle #1938 and change whatever we need to go full strict mode (this will probably take some time).