Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve JavaScript Interop #21

Open
holyjak opened this issue Jan 22, 2018 · 2 comments
Open

Improve JavaScript Interop #21

holyjak opened this issue Jan 22, 2018 · 2 comments
Assignees

Comments

@holyjak
Copy link

holyjak commented Jan 22, 2018

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

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
Copy link
Owner

oakmac commented Jan 22, 2018

Good ideas 👍 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 ?

@oakmac oakmac self-assigned this Jan 22, 2018
@holyjak
Copy link
Author

holyjak commented Jan 22, 2018

  • js-obj only works correctly with string keys.
  • #js {} accepts keywords and transforms them into strings: #js {:prop 123} => {"prop": 123}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants