CreateErrorResultGuard

createErrorResultGuard

createErrorResultGuard

Example

const orderResultGuard: ErrorResultGuard<AddItemToOrderResult>
  = createErrorResultGuard<AddItemToOrderResult>(order => !!order.lines);

Signature

function createErrorResultGuard<T>(testFn: (input: T) => boolean): ErrorResultGuard<T>

Parameters

testFn

parameter
type:
(input: T) => boolean