File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change 7
7
; ; You must not remove this notice, or any other, from this software.
8
8
9
9
(ns cljs.repl
10
- (:require-macros cljs.repl))
10
+ (:require-macros cljs.repl)
11
+ (:require [cljs.spec :as spec]))
11
12
12
- (defn print-doc [m ]
13
+ (defn print-doc [{n :ns nm :name :as m} ]
13
14
(println " -------------------------" )
14
15
(println (str (when-let [ns (:ns m)] (str ns " /" )) (:name m)))
15
16
(when (:protocol m)
46
47
(println " " name)
47
48
(println " " arglists)
48
49
(when doc
49
- (println " " doc)))))))
50
+ (println " " doc))))
51
+ (when n
52
+ (when-let [specs (spec/fn-specs (symbol (str (ns-name n)) (name nm)))]
53
+ (println " Spec" )
54
+ (run! (fn [[role spec]]
55
+ (when (and spec (not (= spec ::spec/unknown )))
56
+ (println " " (str (name role) " :" ) (spec/describe spec))))
57
+ specs))))))
You can’t perform that action at this time.
0 commit comments