oakmac / cljs-cheatsheet

a ClojureScript Cheatsheet
https://cljs.info/cheatsheet
MIT License
67 stars 13 forks source link

Improve JavaScript Interop #21

Open holyjak opened 6 years ago

holyjak commented 6 years ago

Construct JS objects new . (new js/Date args) (module.MyType. args)`

Possibly also explicitly document js/ to explain/remind that it is used to access variables in the global scope?

Also ^:export should be perhaps mentioned?

Perhaps also mention goog.object/set, get (that are advanced-compilation save variants of .-, now that aset can truly only be used for arrays)

oakmac commented 6 years ago

Good ideas :+1: I have been thinking for a while now that the interop section could be improved.

Ideally, #js {} and #js [] should also have a tooltip (which should also highlight the differences from js-obj)

What are the differences between #js {} and js-obj ?

holyjak commented 6 years ago