Skip to content

Commit

Permalink
fetch method should not return void but undefined instead
Browse files Browse the repository at this point in the history
PR-URL: #303
Credit: @Thenkei
Close: #303
Reviewed-by: @isaacs

EDIT(@isaacs): updated to preserve `fetchMethod`'s ability to return
`void`.

BREAKING CHANGE: change to public type signature
  • Loading branch information
Thenkei authored and isaacs committed Jun 15, 2023
1 parent af94a98 commit db7c23c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,7 @@ export namespace LRUCache {
key: K,
staleValue: V | undefined,
options: FetcherOptions<K, V, FC>
) => Promise<V | void | undefined> | V | void | undefined
) => Promise<V | undefined | void> | V | undefined | void

/**
* Options which may be passed to the {@link LRUCache} constructor.
Expand Down

0 comments on commit db7c23c

Please sign in to comment.