这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@NovakAnton
Copy link
Contributor

  • Extended CallTsDsl to support type arguments via typeArgs() method

  • Updated queryOptions.ts to include type parameters:
    - TQueryFnData: response type
    - TError: error type
    - TData: response type
    - TQueryKey: ReturnType

  • Generated queryOptions now have proper type annotations

  • Ran pnpm build --filter="@hey-api/**"

  • Ran pnpm examples:generate

  • Ran pnpm test:update

@bolt-new-by-stackblitz
Copy link

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

@changeset-bot
Copy link

changeset-bot bot commented Nov 11, 2025

🦋 Changeset detected

Latest commit: cdc50e5

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

This PR includes changesets to release 1 package
Name Type
@hey-api/openapi-ts 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
Copy link

vercel bot commented Nov 11, 2025

@NovakAnton is attempting to deploy a commit to the Hey API Team on Vercel.

A member of the Team first needs to authorize it.

@dosubot dosubot bot added size:XL This PR changes 500-999 lines, ignoring generated files. feature 🚀 New feature or request labels Nov 11, 2025
@pkg-pr-new
Copy link

pkg-pr-new bot commented Nov 11, 2025

Open in StackBlitz

npm i https://pkg.pr.new/hey-api/openapi-ts/@hey-api/codegen-core@2964
npm i https://pkg.pr.new/hey-api/openapi-ts/@hey-api/nuxt@2964
npm i https://pkg.pr.new/hey-api/openapi-ts/@hey-api/openapi-ts@2964
npm i https://pkg.pr.new/hey-api/openapi-ts/@hey-api/vite-plugin@2964

commit: cdc50e5

Updated type annotations for queryOptions in TanStack Query.
@codecov
Copy link

codecov bot commented Nov 12, 2025

Codecov Report

❌ Patch coverage is 42.30769% with 45 lines in your changes missing coverage. Please review.
✅ Project coverage is 29.43%. Comparing base (caf79e8) to head (cdc50e5).
⚠️ Report is 8 commits behind head on main.

Files with missing lines Patch % Lines
...rc/plugins/@tanstack/query-core/v5/queryOptions.ts 7.14% 13 Missing ⚠️
packages/openapi-ts/src/ts-dsl/mixins/type-args.ts 40.00% 12 Missing ⚠️
packages/openapi-ts/src/ts-dsl/type/query.ts 38.88% 11 Missing ⚠️
packages/openapi-ts/src/ts-dsl/expr.ts 50.00% 4 Missing ⚠️
...ckages/openapi-ts/src/ts-dsl/mixins/type-params.ts 33.33% 2 Missing ⚠️
packages/openapi-ts/src/ts-dsl/call.ts 66.66% 1 Missing ⚠️
packages/openapi-ts/src/ts-dsl/new.ts 66.66% 1 Missing ⚠️
packages/openapi-ts/src/ts-dsl/type/expr.ts 66.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2964      +/-   ##
==========================================
+ Coverage   29.41%   29.43%   +0.01%     
==========================================
  Files         403      405       +2     
  Lines       35766    35815      +49     
  Branches     2066     2065       -1     
==========================================
+ Hits        10522    10541      +19     
- Misses      25217    25247      +30     
  Partials       27       27              
Flag Coverage Δ
unittests 29.43% <42.30%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@NovakAnton
Copy link
Contributor Author

Hey @mrlubos, I saw the Codecov report showing missing coverage in queryOptions.ts and call.ts (the two files I edited).

I’m not yet familiar with the project’s test setup — could you let me know where or how you’d like me to add tests to get this passing?

Once I know where they should go, I’ll add them and update the PR. Thanks!

@vercel
Copy link

vercel bot commented Nov 12, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
hey-api-docs Ready Ready Preview Comment Nov 12, 2025 0:48am

Copy link
Member

@mrlubos mrlubos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! The only thing that "feels off" is the ReturnType generic, did you consider any alternatives? I'd probably expect a proper type there too

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Nov 12, 2025
@mrlubos mrlubos merged commit cce7e07 into hey-api:main Nov 12, 2025
17 checks passed
@hey-api hey-api bot mentioned this pull request Nov 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature 🚀 New feature or request lgtm This PR has been approved by a maintainer size:XL This PR changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants