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
By the way, use https://clojure.github.io/clojure/clojure.repl-api.html#clojure.repl/doc[doc] to find out more about the namespace-qualified types. Let's see what https://api.typedclojure.org/latest/typed.clj.runtime/clojure.core.typed.html#var-U[U] and `Str` mean.
118
+
By the way, use https://api.typedclojure.org/latest/typed.clj.runtime/typed.clojure.html#var-doc-clj[doc-clj] to find out more about the namespace-qualified types. Let's see what `U` and `Str` mean.
121
119
122
120
[source,clojure]
123
121
------------------------------
124
-
org.my-domain.my-project=> (doc t/U)
125
-
-------------------------
126
-
clojure.core.typed/U
127
-
(U type*)
128
-
U represents a union of types
122
+
org.my-domain.my-project=> (t/doc-clj t/U)
123
+
Special type: typed.clojure/U
124
+
U represents a union of types
125
+
Forms: [(U type*)]
126
+
129
127
nil
130
-
org.my-domain.my-project=> (doc t/Str)
131
-
-------------------------
132
-
clojure.core.typed/Str
133
-
quote
134
-
[Str]
135
-
A string
128
+
org.my-domain.my-project=> (t/doc-clj t/Str)
129
+
Type alias typed.clojure/Str
130
+
String
131
+
Metadata:
132
+
{:doc "A string", :forms '[Str], :file "typed/ann/clojure.cljc"}
136
133
nil
137
134
------------------------------
138
135
139
136
Ok, now since `welcome-string` allows `nil`, it should type check again (don't forget to save the file after updating the annotation!).
140
137
141
138
[source,clojure]
142
139
------------------------------
143
-
org.my-domain.my-project=> (t/check-ns)
140
+
org.my-domain.my-project=> (t/check-ns-clj)
144
141
Start checking org.my-domain.my-project
145
142
Checked org.my-domain.my-project in 32.831593 msecs
0 commit comments