v1.2.0
In this release there were minor miscellaneous typing improvements, but the bigger change is the way functions are normalized and typed.
Previously most Prague helpers returned a type of the form Transform<ARGS, RESULT>
which really meant (...args: ARGS) => Promise<RESULT>
. It was unwieldy to support a type name for such a simple concept, and ultimately unnecessary. Goodbye, Transform
, we hardly knew ya.
In addition, there was a change to the handling of undefined
results from Prague transforms. Previously these were normalized to null
via the from
function. Now they pass through unchanged. That means if your code used to say:
if (result === null)
// do something
You now need to say:
if (result == null)
// do something
This is a shorter way of saying:
if (result === null || result === undefined)
// do something
The from
function now just ensures that your function returns a Promise
.