Used to explicitly type the assert function returned by createAssert.
assert
Make sure to use typeof before your custom error class, otherwise the type passed will be an instance of the error class instead of the class itself.
typeof
const assert: Assert<typeof MyError> = ...// ^ don't forget this Copy
const assert: Assert<typeof MyError> = ...// ^ don't forget this
Generated using TypeDoc
Used to explicitly type the
assert
function returned by createAssert.Make sure to use
typeof
before your custom error class, otherwise the type passed will be an instance of the error class instead of the class itself.