Skip to content

retryExchange: TS error: Type 'Error' is not assignable to type 'boolean'. ts(2345) #1464

Answered by kitten
frederikhors asked this question in Q&A
Discussion options

You must be logged in to vote

It's because you typed this as retryIf: (err: CombinedError) => Error but it expects a boolean return value. By the way, you likely don't want to duplicate types for larger objects like this and instead either rely on inference or the package's option type.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@frederikhors
Comment options

@JoviDeCroock
Comment options

Answer selected by JoviDeCroock
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants