ClojureScript admission for Malli function schemas.
Mirrors skeptic.malli-spec.collect/ns-malli-spec-results for cljs source
files. Two channels:
:malli/schema spec the worker captured off the
raw source-form into each cljs entry's :malli-schema field
(skeptic.worker.server/project-cljs-entry), exactly as the clj collector
reads its entries. The cljs AST never carries user var-meta at
[:var :info :meta], so this channel reads the entry field, not the AST.(malli.core/=> sym SPEC) macroexpands to a
top-level :op :do whose form is
(do (malli.core/-register-function-schema! 'ns 'sym SPEC nil :cljs id) 'ns/sym).
Classification walks the outer :form directly.No cenv reads, no caller-managed compiler state.
ClojureScript admission for Malli function schemas. Mirrors `skeptic.malli-spec.collect/ns-malli-spec-results` for cljs source files. Two channels: - Var-meta channel: the `:malli/schema` spec the worker captured off the raw source-form into each cljs entry's `:malli-schema` field (`skeptic.worker.server/project-cljs-entry`), exactly as the clj collector reads its entries. The cljs AST never carries user var-meta at `[:var :info :meta]`, so this channel reads the entry field, not the AST. - Registration channel: `(malli.core/=> sym SPEC)` macroexpands to a top-level `:op :do` whose form is `(do (malli.core/-register-function-schema! 'ns 'sym SPEC nil :cljs id) 'ns/sym)`. Classification walks the outer `:form` directly. No cenv reads, no caller-managed compiler state.
(ns-malli-spec-results-cljs source-file ns-sym entries)Inputs: [source-file :- s/Any ns-sym :- s/Symbol entries :- [#:s{Keyword s/Any}]] Returns: mcs/MalliAdmissionResult
Per-namespace Malli admission for cljs sources. Inputs:
source-file: the cljs source file, attached to error results.ns-sym: the namespace symbol.entries: per-form cljs entries carrying :ast (registration channel)
and :malli-schema (var-meta channel, captured off the raw source-form
by the worker). No cenv reads.Inputs: [source-file :- s/Any ns-sym :- s/Symbol entries :- [#:s{Keyword s/Any}]]
Returns: mcs/MalliAdmissionResult
Per-namespace Malli admission for cljs sources. Inputs:
- `source-file`: the cljs source file, attached to error results.
- `ns-sym`: the namespace symbol.
- `entries`: per-form cljs entries carrying `:ast` (registration channel)
and `:malli-schema` (var-meta channel, captured off the raw source-form
by the worker). No cenv reads.cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |