You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
David Nolen edited this page Aug 9, 2015
·
22 revisions
ClojureScript can easily leverage Google Closure for compile time type checking. This is done simply via ClojureScript docstrings which are compiled into JSDoc style comment blocks. Google Closure supports many useful kinds of type annotation. For example you can write a function that takes non-nullable Object.
(defnfoo"@param {!Object} x [x] x)
If Closure can infer that some invoke may pass null, this will result in a compile time type error.