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
Copy file name to clipboardexpand all lines: docs/function-schemas.md
+5-5
Original file line number
Diff line number
Diff line change
@@ -158,7 +158,7 @@ Explanation why it is not valid:
158
158
159
159
Smallest failing invocation is `(str 0 0)`, which returns `"00"`, which is not an `:int`. Looks good.
160
160
161
-
But, why `mg/function-checker` is not enabled by default? The reason is that it uses generartive testing, which is orders of magnitude slower than normal validation and requires an extra dependency to `test.check`, which would make `malli.core` much heavier. This would be expecially bad for CLJS bundle size.
161
+
But, why `mg/function-checker` is not enabled by default? The reason is that it uses generative testing, which is orders of magnitude slower than normal validation and requires an extra dependency to `test.check`, which would make `malli.core` much heavier. This would be especially bad for CLJS bundle size.
Besides testing function schemas as values, we can also intrument functions to enable runtime validation of arguments and return values.
318
+
Besides testing function schemas as values, we can also instrument functions to enable runtime validation of arguments and return values.
319
319
320
-
Simplest way to do this is to use `m/-instrument` which takes options map and a function and returns a instrumented function. Valid options include:
320
+
Simplest way to do this is to use `m/-instrument` which takes an options map and a function and returns an instrumented function. Valid options include:
321
321
322
322
| key | description |
323
323
| ----------|-------------|
@@ -561,7 +561,7 @@ Execution error (ExceptionInfo) at malli.core/-exception (core.cljc:138).
561
561
562
562
### Defn Instrumentation
563
563
564
-
The function (Var) registry is passive and doesn't do anything by itself. To instrument the Vars based on the registry, there is the `malli.instrument` namespace. Var instrumentations focus is for development time, but can also be used for production builds.
564
+
The function (Var) registry is passive and doesn't do anything by itself. To instrument the Vars based on the registry, there is the `malli.instrument` namespace. Var instrumentation is intended for development time, but can also be used for production builds.
565
565
566
566
```clojure
567
567
(require '[malli.instrument :as mi])
@@ -804,4 +804,4 @@ Here's the same code in [Cursive IDE](https://cursive-ide.com/) with [clj-kondo]
* better integration with [clj-kondo](https://github.com/clj-kondo/clj-kondo) and [clojure-lsp](https://github.com/clojure-lsp/clojure-lsp) for enchanced DX.
807
+
* better integration with [clj-kondo](https://github.com/clj-kondo/clj-kondo) and [clojure-lsp](https://github.com/clojure-lsp/clojure-lsp) for enhanced DX.
0 commit comments