docs.mli 485 B

1234567891011121314151617181920212223242526
  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