feat: use strict typescript settings#131
Merged
Merged
Conversation
mnahkies
force-pushed
the
mn/fix/strict-typescript
branch
from
March 2, 2024 10:45
8eb8528 to
5e88b0a
Compare
mnahkies
marked this pull request as ready for review
March 2, 2024 14:03
mnahkies
added a commit
that referenced
this pull request
Dec 8, 2024
previously we were always treating it as `false`, rather than using the value we read from the `tsconfig.json` file. this was intentional at the time in #131 > - For `typescript-koa` include `| undefined` on optional properties when `exactOptionalPropertyTypes` is configured > - This shouldn't be required for the clients, as in this case the consumer can choose to omit keys > - Though maybe it's more ergonomic to follow this behavior anyway? However it turns out this can cause issues with the `zod` schemas when runtime validation is enabled, and so it's better to follow this `| undefined` pattern on the clients as well. It's probably more ergonomic as well tbh.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adopt "strictest" typescript base settings, and adjust code generation to support this
timeoutkey when no timeout passed for axios to be compatible withexactOptionalPropertyTypestsconfig.jsonfor specified output directorytypescript-koainclude| undefinedon optional properties whenexactOptionalPropertyTypesis configured