Fix init omitting logic #163
Merged
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.
This pull request includes several changes to improve type safety and documentation in the
pkgs/docs/docs/04_client/overview.md
andpkgs/typed-api-spec
files. The most important changes include removing unnecessary parameters from fetch calls, adding a newAnd
type, and updating theFetchT
type to enforce stricter type checks.Improvements to type safety in fetch calls:
pkgs/docs/docs/04_client/overview.md
: Removed unnecessary empty object parameters from fetch calls to simplify the code and improve readability. [1] [2] [3] [4]Enhancements to type definitions and tests:
pkgs/typed-api-spec/src/core/type.ts
: Added a newAnd
type to compute the logical AND of a tuple of boolean types at the type level.pkgs/typed-api-spec/src/core/type.t-test.ts
: Added test cases for the newAnd
type to ensure its correctness.Updates to
FetchT
type:pkgs/typed-api-spec/src/fetch/index.ts
: Updated theFetchT
type to include new template parametersCanOmitHeaders
andCanOmitBody
, and modified theCanOmitInit
parameter to use the newAnd
type for stricter type checks. [1] [2] [3] [4]Documentation improvements:
pkgs/docs/docs/04_client/overview.md
: Added a new section to explain the type safety enforcement for theinit
parameter in fetch calls, ensuring adherence to API specifications.These changes collectively enhance the type safety and clarity of the codebase, making it easier to maintain and less prone to runtime errors.