js-on-sx: object literal spread {...src}
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 31s

This commit is contained in:
2026-05-09 23:42:13 +00:00
parent f15a8d8fef
commit 25b30788b4
4 changed files with 70 additions and 8 deletions

View File

@@ -482,14 +482,21 @@
(map
(fn
(entry)
(list
(js-sym "js-obj-set!")
(js-sym "_obj")
(if
(contains? (keys entry) :computed-key)
(list (js-sym "js-to-string") (js-transpile (get entry :computed-key)))
(get entry :key))
(js-transpile (get entry :value))))
(cond
((contains? (keys entry) :spread)
(list
(js-sym "js-obj-spread!")
(js-sym "_obj")
(js-transpile (get entry :spread))))
(else
(list
(js-sym "js-obj-set!")
(js-sym "_obj")
(if
(contains? (keys entry) :computed-key)
(list (js-sym "js-to-string") (js-transpile (get entry :computed-key)))
(get entry :key))
(js-transpile (get entry :value))))))
entries)
(list (js-sym "_obj")))))))