scittle

borkdude 2022-09-20T21:14:59.032049Z

borkdude 2022-09-20T21:17:40.049539Z

@leobm Unfortunately this-as isn't available in scittle, but you can do it like this:

(defn Foo [z]
  (let [obj #js {:x 1
                 :y 2
                 :z z}]
    (set! (.-test obj) (fn [] (.-z obj)))
    obj))

(prn (-> (Foo 1) (.test)))