From 383285ecd5292bf9a825e05904955b937de84cc9 Mon Sep 17 00:00:00 2001 From: Minteck Date: Sat, 4 Jun 2022 08:51:01 +0200 Subject: Initial commit --- node_modules/error/docs.mli | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 node_modules/error/docs.mli (limited to 'node_modules/error/docs.mli') diff --git a/node_modules/error/docs.mli b/node_modules/error/docs.mli new file mode 100644 index 0000000..7a1dac7 --- /dev/null +++ b/node_modules/error/docs.mli @@ -0,0 +1,26 @@ +type OptionError := { + option: T | null, + message: String, + type: "OptionError" +} + +type TypedError := { + message: String, + type: T +} + +type ValidationError := { + errors: Array, + message: String, + type: "ValidationError" +} + +error/option := (String, T) => OptionError + +error/typed := (args: { + message: String, + type: String, + name?: String +}) => (opts: Object) => TypedError + +error/validation := (Array) => ValidationError -- cgit