Enabling creating several unions from some variants
const success = ofType<AddActionSuccess>()
const failure = ofType<AddActionFailure>()
const error = ofType<AddActionError>()
export const addAction = unionize({
success,
failure
})
export const addAction2 = unionize({
success,
failure,
error
})
and also using the predicates and constructor from each variant, individually (while preserving usage from the union too!)
const success = ofType<AddActionSuccess>()
success.is(...) // predicate
success.of(...) // constructor
Enabling creating several unions from some variants
and also using the predicates and constructor from each variant, individually (while preserving usage from the union too!)