Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Retry policies broken in 2.0.0 #34

Closed
tomasAlabes opened this issue Dec 11, 2020 · 1 comment
Closed

Retry policies broken in 2.0.0 #34

tomasAlabes opened this issue Dec 11, 2020 · 1 comment

Comments

@tomasAlabes
Copy link

tomasAlabes commented Dec 11, 2020

A policy creation like Policy.handleAll().retry().backoff(new ConstantBackoff(2000, 10)) fails with the following error:

Argument of type 'ConstantBackoff' is not assignable to parameter of type 'IBackoff<IRetryBackoffContext<unknown>>'.
  Property 'duration' is missing in type 'ConstantBackoff' but required in type 'IBackoff<IRetryBackoffContext<unknown>>'.
         .retry().backoff(new ConstantBackoff(2000, 10))
                            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

  node_modules/cockatiel/dist/backoff/Backoff.d.ts:18:14
    18     readonly duration: number;
                    ~~~~~~~~
    'duration' is declared here.

It works in version 1.1.1.

Node 12.19.1
Typescript 4.1.2

@connor4312
Copy link
Owner

Thanks, fixed in 2.0.1

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

No branches or pull requests

2 participants