Investigate applying defaults in Typescript spec mapper
JSDoc @default tags describe effective defaults, but TypeScript preserves omitted values as undefined. Haskell applies the defaults later.
Examples
auth.onAuthSucceededRedirectTo-> it'sundefinedin Typescript, but the JS doc says the@defaultis/which is set in Haskell https://github.com/wasp-lang/wasp/blob/457ded2a7a5dffb15b3eeec43a2d0289c6fbd964/waspc/data/packages/spec/src/spec/publicApi/waspSpec.ts#L177-L186 https://github.com/wasp-lang/wasp/blob/457ded2a7a5dffb15b3eeec43a2d0289c6fbd964/waspc/src/Wasp/Generator/SdkGenerator/Auth/Common.hs#L6-L7deployment.modehttps://github.com/wasp-lang/wasp/blob/457ded2a7a5dffb15b3eeec43a2d0289c6fbd964/waspc/data/packages/spec/src/spec/publicApi/waspSpec.ts#L87-L93 https://github.com/wasp-lang/wasp/blob/457ded2a7a5dffb15b3eeec43a2d0289c6fbd964/waspc/src/Wasp/AppSpec/App.hs#L42-L44
What we should do
Decide where we apply defaults:
- in the TypeScript mapper so the resulting spec contains the default value,
- or in Haskell so we keep the compiler as source of truth?
Source: wasp-lang/wasp