-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ClojureScript compatibility + Primitive type hint support + spec->hint inference #45
Conversation
46ecbf9
to
41904a9
Compare
@lennartbuit: check out this branch, I got it almost working! |
...the Would you give it a 👀? |
Yep, I sadly found out why: |
clojure/clojurescript@23ab9a0 is there though... its tag matches our version I couldn't get even the basic case (plain compile-time non-partial extension) to work, so sth is off I believe |
Yeah, I was prematurely concluding. I am having the same issue indeed. Meh, will need to set up a cljs repl somehow then. |
Removed intended support of Not a big deal, we can add it later Tests are passing for both suites, with better coverage than before Pending:
Basically I have to make utils.spec expect/understand |
At least temporarily, since it impedes running the ClojureScript test suite.
…e:lein-2.8.1-node Necessary for the ClojureScript test suite.
(will re-open in its final form tomorrow) |
primitives
: accept clj? argprimitive?
: accept clj? argthrown? Exception
?{:post [(if-not % true (-> % :spec))]}
testing "Arguments hinting for multi-arity functions"
needs a single-arity counterpart(extract-specs-from-metadata {:tag 'js/Number} false)
and suchconsistent-tagging?
and other similar fns:pre
s to usecheck!
:pre
s into:post
sNote that boolean return values will be turned into Booleans, chars will become Characters, and numeric primitives will become Numbers unless they are immediately consumed by a method taking a primitive.
https://clojure.org/reference/java_interop