Fork me on GitHub
#cljs-dev
<
2015-09-01
>
martinklepsch15:09:29

@dnolen: wondering if we could get rid of the ^boolean in (when ^boolean goog.DEBUG …) — is that in the same area as the recent type additions?

martinklepsch15:09:54

if so I might read up on those commits and see if I get an idea

martinklepsch15:09:46

(maybe this would be easier to do for defines emitted via goog-define than pre-existing ones)

dnolen15:09:40

@martinklepsch: just make sure you type hint the var - should work. If it doesn’t there's probably a simple bug around boolean inference.

martinklepsch15:09:09

ok sweet, will give it a spin

martinklepsch15:09:39

@dnolen: is there documentation about what type annotations are available? do they map 100% from clojure?

martinklepsch15:09:57

(sorry could have asked that in #C03S1L9DN as well)

dnolen15:09:16

@martinklepsch: not really because the only one that matters is boolean

dnolen15:09:01

Type hints in clojure are about reflection, meaningless for JS

martinklepsch16:09:56

Didn’t get it working immediately, logged a ticket: http://dev.clojure.org/jira/browse/CLJS-1439

martinklepsch16:09:00

In general it would be nice to have similar annotations for the already defined constants like goog.DEBUG although I'm not sure how/if that's possible.

dnolen16:09:44

@martinklepsch: those should probably just be hard coded, not really worth any more effort