v2.0.0
Breaking changes
- The call signature of
untilhas changed to:
function until<ErrorType, DataType>(promise: () => Promise<DataType>): Promise<{ error: ErrorType, data: null } | { error: null, data: DataType}>On practice, this means the following:
-const [error, data] = await until(() => action())
+const { error, data } = await until(() => action())- The order of the generics
untilaccepts also changed:
-function until<DataType, ErrorType>() {}
+function until<ErrorType, DataType>(){}