Skip to content

Commit 2ca2de9

Browse files
Document :warning-handlers (#384)
Written as if CLJS-3074 is merged, implying that symbols are resolved to the appropriate function. Co-authored-by: Dominic Monroe <[email protected]>
1 parent dd292b5 commit 2ca2de9

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

content/reference/compiler-options.adoc

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1122,3 +1122,20 @@ Is a function that will be called after a successful build.
11221122
----
11231123
:watch-fn (fn [] (println "Updated build"))
11241124
----
1125+
1126+
[[warning-handlers]]
1127+
=== :warning-handlers
1128+
1129+
Set a vector of handlers to customize handling of emitted warnings.
1130+
A handler should be either a symbol (to be resolved as a function) or a function.
1131+
The signature of each function is `[warn-type env warn-info]`.
1132+
`warn-type` is a keyword describing the <<#warnings,warning>>,
1133+
`env` is the analysis environment,
1134+
and `warn-info` is a map of extra useful information for a particular warning type.
1135+
1136+
Defaults to:
1137+
1138+
[source,clojure]
1139+
----
1140+
:warning-handlers [cljs.analyzer/default-warning-handler]
1141+
----

0 commit comments

Comments
 (0)