Back
WritePort (clj)
(source)protocol
Examples
Zetawar/zetawar
(ns zetawar.system.spec
(:require
[cljs.core.async :as async]
[cljs.core.async.impl.protocols :as async.protocols]
[clojure.spec :as s]
[clojure.spec.impl.gen :as gen]
[clojure.test.check]
[datascript.core :as d]))
;; Router
(s/def :zetawar.system.router/ev-chan
(s/with-gen
(s/and #(satisfies? async.protocols/ReadPort %)
#(satisfies? async.protocols/WritePort %))
#(gen/return (async/chan))))
(s/def :zetawar.system.router/notify-chan
(s/with-gen
#(satisfies? async.protocols/WritePort %)
#(gen/return (async/chan))))