Skip to main content
Module

x/easyts/mod.ts>ReadCaseLike

js library written with ts, use select and chan like golang in js.
Latest
interface ReadCaseLike
import { type ReadCaseLike } from "https://deno.land/x/easyts@0.1.2/mod.ts";

Properties

readonly
isReady: boolean

Returns whether this case is ready

Methods

reset(): void

reset read-write status

tryInvoke(): boolean
do(resolve: (c: CaseLike) => void, reject: (c: CaseLike) => void): Connection
invoke(): Promise<void>
read(): undefined | any

Returns the value read by the case, throws an exception if the case is not ready

readRaw(): [undefined, false] | [any, true]

Returns the value read by the case, throws an exception if the case is not ready