compiler option | since v1.9.456 | Edit |
A helpful facility for generating :externs
whenever a
.
form is used on a type-hinted symbol ^js/Foo.Bar x
.
Enable *warn-on-infer*
to be warned of failed inferences.
Successful inferences are written to inferred_externs.js
in
:output-dir
.
:infer-externs true
See Externs for more details.
Given the following cljs code
(defn wrap-baz [^js/Foo.Bar x]
(.baz x))
these externs will be created in inferred_externs.js
:
var Foo = {};
Foo.Bar = function() {};
Foo.Bar.prototype.baz = function() {};