hey-api / openapi-ts

✨ Turn your OpenAPI specification into a beautiful TypeScript client
https://heyapi.vercel.app
MIT License
634 stars 44 forks source link

feat: export type RequestResult of fetch client #698

Closed lsdch closed 1 week ago

lsdch commented 1 week ago

This aims to improve usability of generated fetch clients. Fixes #693

stackblitz[bot] commented 1 week ago

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

changeset-bot[bot] commented 1 week ago

🦋 Changeset detected

Latest commit: fc2b166c8f683ece948284cf7a629fcd5b096b40

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages | Name | Type | | ------------------------- | ----- | | @hey-api/client-fetch | Patch | | @example/openapi-ts-fetch | Patch |

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

vercel[bot] commented 1 week ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
hey-api-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 19, 2024 1:04pm
codecov[bot] commented 1 week ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 70.89%. Comparing base (032bd93) to head (fc2b166).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #698 +/- ## ======================================= Coverage 70.89% 70.89% ======================================= Files 76 76 Lines 7984 7984 Branches 696 696 ======================================= Hits 5660 5660 Misses 2321 2321 Partials 3 3 ``` | [Flag](https://app.codecov.io/gh/hey-api/openapi-ts/pull/698/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=hey-api) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/hey-api/openapi-ts/pull/698/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=hey-api) | `70.89% <ø> (ø)` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=hey-api#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

lsdch commented 1 week ago

@mrlubos Sure, just added it!

lsdch commented 1 week ago

@mrlubos Hey, this PR was actually ineffectual: the type is still made private after going through rollup. I force-pushed a fix on the same branch and made sure it builds as expected.

Apologies for my mistake... Please let me know if I should open a new PR

mrlubos commented 1 week ago

Sure