Liking cljdoc? Tell your friends :D
Clojure only.

typed.cljc.checker.test-utils


tc-eclj

(tc-e tc-common* frm & opts)

Type check an an expression in namespace that :refer's all of clojure.core.typed (aliased to t) and aliases clojure.core to core.

Takes one form and then options, and returns the inferred type if the form checks with the expected input/output types according to the provided options.

The first form in the options can be a static type syntax scoped in the new namespace. This is disambiguated with a call to keyword? (literal keywords aren't valid type syntax).

eg. (tc-e (+ 1 1) Num) ;=> Num

Keyword Options:

:expected-ret An expected ret, evaluated in the current namespace (not the new one that refers c.c.t). Cannot be provided in combination with the implicit first option as a type, as above. :ret Check the return TCResult of this expression against this ret. Evaluated in the current namespace.

Type check an an expression in namespace that :refer's
all of clojure.core.typed (aliased to t) and aliases clojure.core
to core.

Takes one form and then options, and returns the inferred type if the form checks
with the expected input/output types according to the provided options.

The first form in the options can be a static type syntax scoped
in the new namespace. This is disambiguated with a call to keyword?
(literal keywords aren't valid type syntax).

eg. (tc-e (+ 1 1) Num)
    ;=> Num

Keyword Options:

  :expected-ret An expected ret, evaluated in the current namespace (not the new
                one that refers c.c.t). Cannot be provided in combination with the implicit
                first option as a type, as above.
  :ret          Check the return TCResult of this expression against this ret. Evaluated
                in the current namespace.
raw docstring

tc-errclj

(tc-err tc-common* frm & opts)

Like tc-e, except returns true if the form fails to type check.

Like tc-e, except returns true if the form fails to type check.
raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close