Skip to content

fix: lastResult should reflect resolved value#196

Draft
gwansikk wants to merge 1 commit intoTanStack:mainfrom
gwansikk:main
Draft

fix: lastResult should reflect resolved value#196
gwansikk wants to merge 1 commit intoTanStack:mainfrom
gwansikk:main

Conversation

@gwansikk
Copy link
Copy Markdown

@gwansikk gwansikk commented Apr 14, 2026

🎯 Changes

lastResult in AsyncDebouncerState, AsyncThrottlerState, and AsyncRateLimiterState is typed as ReturnType<TFn> | undefined, which resolves to Promise<T> | undefined since TFn extends AnyAsyncFunction. At runtime, the stored value is always the awaited result.

- lastResult: ReturnType<TFn> | undefined
+ lastResult: Awaited<ReturnType<TFn>> | undefined

✅ Checklist

  • I have followed the steps in the Contributing guide.
  • I have tested this code locally with pnpm run test:pr.

🚀 Release Impact

  • This change affects published code, and I have generated a changeset.
  • This change is docs/CI/dev-only (no release).

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 14, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: d17ff482-f281-4b7b-94d3-d93a1582c3f9

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands and usage tips.

@gwansikk gwansikk changed the title fix(types): lastResult should reflect resolved value fix: lastResult should reflect resolved value Apr 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant