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 f7f8375 commit 8ddfb80Copy full SHA for 8ddfb80
src/main/clojure/cljs/compiler.cljc
@@ -549,6 +549,11 @@
549
550
:else line))
551
552
+(defn checking-types? []
553
+ (#{:error :warn}
554
+ (get-in @env/*compiler*
555
+ [:options :closure-warnings :check-types])))
556
+
557
(defn emit-comment
558
"Emit a nicely formatted comment string."
559
([doc jsdoc]
@@ -558,7 +563,9 @@
563
docs (if jsdoc (concat docs jsdoc) docs)
564
docs (remove nil? docs)]
560
565
(letfn [(print-comment-lines [e]
561
- (let [[x & ys] (map #(munge-param-return env %) (string/split-lines e))]
566
+ (let [[x & ys]
567
+ (map #(if (checking-types?) (munge-param-return env %) %)
568
+ (string/split-lines e))]
562
569
(emitln " * " (string/replace x "*/" "* /"))
570
(doseq [next-line ys]
571
(emitln " * "
0 commit comments