Skip to content

Releases: open-draft/until

v2.1.0

18 Apr 16:50
Compare
Choose a tag to compare

v2.1.0 (2023-04-18)

Features

Bug Fixes

v2.0.0

16 Feb 16:12
Compare
Choose a tag to compare

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>(){}