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 40
40
unsafe-bit-and bit-shift-right-zero-fill mask bitpos caching-hash
41
41
defcurried rfn specify! js-this this-as implements? array js-obj
42
42
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])])
44
45
#? (:cljs (:require-macros [cljs.core :as core]))
45
46
(:require clojure.walk
46
47
clojure.set
879
880
(reduce core/str " " ))
880
881
" */" ))))
881
882
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
+
882
889
(core/defmacro js-inline-comment
883
890
" Emit an inline JavaScript comment."
884
891
[comment]
You can’t perform that action at this time.
0 commit comments