Skip to content

Commit 5865ebb

Browse files
committed
get var visibility
1 parent d79078f commit 5865ebb

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

src/main/clojure/cljs/externs.clj

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
CompilerOptions SourceFile JsAst CommandLineRunner]
1616
[com.google.javascript.jscomp.parsing Config$JsDocParsing]
1717
[com.google.javascript.rhino
18-
Node Token JSTypeExpression]
18+
Node Token JSTypeExpression JSDocInfo$Visibility]
1919
[java.util.logging Level]))
2020

2121
(def ^:dynamic *ignore-var* false)
@@ -33,8 +33,7 @@
3333
(defn get-tag [^JSTypeExpression texpr]
3434
(when-let [root (.getRoot texpr)]
3535
(if (.isString root)
36-
(symbol (.getString root))
37-
(if-let [child (.. root getFirstChild)]
36+
(symbol (.getString root))(if-let [child (.. root getFirstChild)]
3837
(if (.isString child)
3938
(symbol (.. child getString)))))))
4039

@@ -57,7 +56,9 @@
5756
{:file *source-file*
5857
:line (.getLineno node)}
5958
(when-let [doc (.getOriginalCommentString info)]
60-
{:doc doc}))))))
59+
{:doc doc})
60+
(when (= JSDocInfo$Visibility/PRIVATE (.getVisibility info))
61+
{:private true}))))))
6162

6263
(defmulti parse-extern-node
6364
(fn [^Node node]
@@ -202,10 +203,13 @@
202203
(closure/js-source-file "goog/string/string.js"
203204
(io/input-stream (io/resource "goog/string/string.js"))))
204205

205-
(externs-map
206-
[(closure/js-source-file "goog/string/string.js"
207-
(io/input-stream (io/resource "goog/string/string.js")))]
208-
{})
206+
(-> (externs-map
207+
[(closure/js-source-file "goog/string/string.js"
208+
(io/input-stream (io/resource "goog/string/string.js")))]
209+
{})
210+
(get-in '[goog string])
211+
(find 'numberAwareCompare_)
212+
first meta)
209213

210214
(externs-map)
211215

0 commit comments

Comments
 (0)