File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change 1313 [clojure.string :as string])
1414 (:import [com.google.javascript.jscomp
1515 CompilerOptions CompilerOptions$Environment SourceFile CompilerInput CommandLineRunner]
16- [com.google.javascript.jscomp.parsing Config$JsDocParsing]
16+ [com.google.javascript.jscomp.parsing Config$JsDocParsing JsDocInfoParser$ExtendedTypeInfo ]
1717 [com.google.javascript.rhino
18- Node Token JSTypeExpression JSDocInfo$Visibility]
18+ Node Token JSTypeExpression JSDocInfo JSDocInfo $Visibility]
1919 [java.util.logging Level]
2020 [java.net URL]))
2121
108108 (= t 'Array) 'array
109109 :else t)))
110110
111+ (defn get-params
112+ " Return param information in JSDoc appearance order. GCL is relatively
113+ civilized, so this isn't really a problem."
114+ [^JSDocInfo info]
115+ (map
116+ (fn [n]
117+ (let [t (.getParameterType info n)]
118+ {:name (symbol n)
119+ :optional? (.isOptionalArg t)
120+ :var-args? (.isVarArgs t)}))
121+ (.getParameterNames info)))
122+
111123(defn get-var-info [^Node node]
112124 (when node
113125 (let [info (.getJSDocInfo node)]
You can’t perform that action at this time.
0 commit comments