Releases: open-draft/until
Releases · open-draft/until
v2.1.0
v2.0.0
Breaking changes
- The call signature of
until
has 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
until
accepts also changed:
-function until<DataType, ErrorType>() {}
+function until<ErrorType, DataType>(){}