You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Another thing to consider is how to add rich error processing.
i.e. instead of just pass down and up the error, we can process it.
e.g.
typeAdd<A,B>=DoWork<A,B>extends infer Result
? ResultextendsFailBrand<unknown>
? `Cannot add '${A}` and `${B}` dueto${Result.message}`
: Result
: never
The idea is to use branding for fail case when do a brand check to see if the result is an error.
Instead of:
Accept
Maybe<NumericStruct>
and propagate the error.This will simplify many implementation.
The text was updated successfully, but these errors were encountered: