We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8f1f977 commit 61308c7Copy full SHA for 61308c7
src/main/clojure/cljs/analyzer.cljc
@@ -55,6 +55,24 @@
55
56
(def ^:dynamic *file-defs* nil)
57
58
+#?(:clj
59
+ (def transit-read-opts
60
+ (util/compile-if (import '[com.cognitect.transit ReadHandler])
61
+ {:handlers
62
+ {"cljs/js"
63
+ (reify com.cognitect.transit.ReadHandler
64
+ (fromRep [_ v] (JSValue. v)))}})))
65
+
66
67
+ (def transit-write-opts
68
+ (util/compile-if (import '[com.cognitect.transit WriteHandler])
69
70
+ {JSValue
71
+ (reify com.cognitect.transit.WriteHandler
72
+ (tag [_ _] "cljs/js")
73
+ (rep [_ js] (.val ^JSValue js))
74
+ (stringRep [_ _] nil))}})))
75
76
#?(:clj
77
(def transit
78
(delay
0 commit comments