Add JsonStringifyResult type #160
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 the
typed-api-specpackage, focusing on enhancing JSON handling and adding new test cases. The most important changes are the introduction of theJsonStringifyResulttype, updates to theFetchTtype, and modifications to the ESLint configuration.Enhancements to JSON handling:
pkgs/typed-api-spec/src/json/index.ts: Introduced theJsonStringifyResulttype to handle JSON stringification results, including support for complex types likeDate, and added detailed type transformations for JSON-compatible structures.pkgs/typed-api-spec/src/json/index.test.ts: Added new test cases to validate theJsonStringifyResulttype, ensuring correct handling of various data types and structures.Updates to FetchT type:
pkgs/typed-api-spec/src/fetch/index.ts: Renamed theResBodytype parameter toResponsein theFetchTtype and updated the return type toPromise<Response>. [1] [2]Modifications to ESLint configuration:
pkgs/typed-api-spec/.eslintrc.js: Added a new file pattern**/*.t-test.tsto thedRefarray and updated thedepRulesto allow references fromsrc/core. [1] [2]Additional changes:
pkgs/typed-api-spec/src/core/spec.ts: ImportedJsonStringifyResultand updated theAnyResponsetype to useJsonStringifyResultfor response bodies. [1] [2]pkgs/typed-api-spec/src/fetch/index.t-test.ts: Added new test cases to validate theJsonStringifyResulttype within the fetch module. [1] [2]