UI for Zipcoin Blue

123456789101112131415161718192021222324252627
  1. type OptionError<T> := {
  2. option: T | null,
  3. message: String,
  4. type: "OptionError"
  5. }
  6. type TypedError<T> := {
  7. message: String,
  8. type: T
  9. }
  10. type ValidationError := {
  11. errors: Array<Error>,
  12. message: String,
  13. type: "ValidationError"
  14. }
  15. error/option := (String, T) => OptionError<T>
  16. error/typed := (args: {
  17. message: String,
  18. type: String,
  19. name?: String
  20. }) => (opts: Object) => TypedError<String>
  21. error/validation := (Array<Error>) => ValidationError