File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change 4040 unsafe-bit-and bit-shift-right-zero-fill mask bitpos caching-hash
4141 defcurried rfn specify! js-this this-as implements? array js-obj
4242 simple-benchmark gen-apply-to js-str es6-iterable load-file* undefined?
43- specify copy-arguments goog-define js-comment js-inline-comment])])
43+ specify copy-arguments goog-define js-comment js-inline-comment
44+ unsafe-cast])])
4445 #? (:cljs (:require-macros [cljs.core :as core]))
4546 (:require clojure.walk
4647 clojure.set
879880 (reduce core/str " " ))
880881 " */" ))))
881882
883+ (core/defmacro unsafe-cast
884+ " EXPERIMENTAL: Subject to change. Unsafely cast a value to a different type."
885+ [t x]
886+ (core/let [cast-expr (core/str " ~{} = /** @type {" t " } */ (~{})" )]
887+ (core/list 'js* cast-expr x x)))
888+
882889(core/defmacro js-inline-comment
883890 " Emit an inline JavaScript comment."
884891 [comment]
You can’t perform that action at this time.
0 commit comments