The async-retry function has a generic type parameter `A` and TypeScript is unable to infer the concret type when the `bail` function, whose type references the generic type, is specified. Reading the source and API documentation of async-retry, `bail` returns nothing so `void` is the right type here. This in turn fixes inference of the generic type parameter `A`.
Tested by adding some expected return types to the test file. The type checks failed before this commit. With this commit, they pass.