Forcefully asserts the type of the last output to be T and returns that original value.
T
using(unknownValue).pipe( assertType<number[]>(), reduce((acc, x) => acc + x));
Generated using TypeDoc
Forcefully asserts the type of the last output to be
T
and returns that original value.Example