This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-05-27
Channels
- # admin-announcements (1)
- # beginners (1)
- # boot (37)
- # cbus (1)
- # cider (44)
- # cljs-dev (16)
- # cljsjs (2)
- # cljsrn (18)
- # clojure (205)
- # clojure-belgium (6)
- # clojure-china (1)
- # clojure-india (1)
- # clojure-russia (24)
- # clojure-spec (21)
- # clojure-turkiye (1)
- # clojure-uk (72)
- # clojurescript (91)
- # core-async (4)
- # cursive (12)
- # data-science (2)
- # datascript (2)
- # datomic (12)
- # emacs (6)
- # flambo (7)
- # funcool (12)
- # hoplon (24)
- # incanter (2)
- # jobs-discuss (29)
- # keechma (2)
- # lein-figwheel (2)
- # leiningen (2)
- # mount (13)
- # nyc (2)
- # om (76)
- # om-next (1)
- # onyx (38)
- # other-languages (4)
- # planck (40)
- # re-frame (33)
- # reagent (101)
- # ring-swagger (5)
- # slack-help (1)
- # untangled (7)
- # yada (14)
@niwinz: Getting
Uncaught TypeError: Cannot set property '_bitField' of undefined
with advanced compilation. Using promesa 1.2.0. Example code: (ns cljs-js-wrapper.core
(:require [promesa.core :as p]
[beicon.core :as s]
[postal.client :as pc]))
(enable-console-print!)
(defn ^:export client
[url]
(pc/client url))
(defn ^:export subscribe
[c dest data]
(pc/subscribe c dest (js->clj data :keywordize-keys true)))
(defn ^:export on-value
[bus val-fn err-fn done-fn]
(s/subscribe bus
(fn [v]
(val-fn (clj->js v)))
(fn [v]
(err-fn (clj->js v)))
done-fn))
(defn ^:export send
[c opts callback]
(p/then (pc/send! c (js->clj opts :keywordize-keys true))
(fn [frame]
(callback (clj->js frame)))))
FYI, calling the code from JS like this:
var a = cljs_js_wrapper.core;
var client = a.client("");
a.subscribe(client, "stream-update");
a.send(client, {type: "novelty", dest: "foo", data: {id: "123"}}, function(v){
console.log(v);
})
@niwinz: Right. I was thinking it may have something to do with the externs. Might be worth trying to update bluebird to the latest?
@niwinz or @kenny : are you the owner of https://github.com/funcool/postal ? I have a pr for you if your are interested https://github.com/funcool/postal/pull/3