ValueWithError type

Value result with error.

type ValueWithError = { error: string, value: any }