Welcome! Please see the About page for a little more info on how this works.

+1 vote
in ClojureScript by

set! can take 3 arguments, as in {{(set o -prop val)}} per CLJS-198.

The docstring could be updated to reflect this, perhaps by adding this to the list of forms near the top of the docstring:

(set! instance-expr -instanceFieldName-symbol expr)

Implementation guidance:

The docstring is driven by the forms meta here https://github.com/clojure/clojurescript/blob/6eedd0a08c49f7b0d4dcb30977b2fb38c90577bd/src/main/clojure/cljs/repl.cljc#L1207

5 Answers

0 votes
by

Comment made by: mfikes

For Eugene's CA status see CLJS-2729.

0 votes
by

Comment made by: mfikes

With CLJS-2924.patch:

`

cljs.user=> (doc set!)

set!
(set! var-symbol expr)
(set! (.- instance-expr instanceFieldName-symbol) expr)
(set! instance-expr -instanceFieldName-symbol expr)
Special Form
Used to set vars and JavaScript object fields

Please see http://clojure.org/vars#set
`

0 votes
by

Comment made by: mfikes

CLJS-2924.patch LGTM and passes in CI.

0 votes
by

Comment made by: mfikes

CLJS-2924.patch added to Patch Tender (i)

0 votes
by
Reference: https://clojure.atlassian.net/browse/CLJS-2924 (reported by mfikes)
...