Skip to content

Commit

Permalink
Improve typings of refreshable
Browse files Browse the repository at this point in the history
  • Loading branch information
JosXa committed Jun 2, 2024
1 parent bf1049d commit 3459e78
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/healthy-kids-explain.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@josxa/kit-utils': patch
---

Improve typings of refreshable
2 changes: 1 addition & 1 deletion src/refreshable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export type RefreshableControls<T> = {
* @param refreshHint The hint to show while refreshing
*/
export async function refreshable<T>(
prompt: (controls: RefreshableControls<T>) => T | Promise<T>,
prompt: (controls: RefreshableControls<T>) => Promise<T | typeof FORCE_REFRESH>,
refreshHint?: string,
): Promise<T> {
let refreshCount = 0
Expand Down

0 comments on commit 3459e78

Please sign in to comment.