functype 1.1.0 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Tuple-BmPH46pK.d.ts → Tuple-8yRldBty.d.ts} +37 -1
- package/dist/Tuple-knEoDiKZ.js +4 -0
- package/dist/chunk-DK3Fl9T5.js +1 -0
- package/dist/cli/exports.d.ts +1 -0
- package/dist/cli/exports.js +1 -1
- package/dist/cli/index.js +5 -5
- package/dist/do/index.d.ts +1 -1
- package/dist/do/index.js +1 -1
- package/dist/either/index.d.ts +1 -1
- package/dist/either/index.js +1 -1
- package/dist/{full-interfaces-BWlSseWx.js → full-interfaces-CLF4LjBB.js} +53 -8
- package/dist/{index-pSswBNzx.d.ts → index-DAKubqXO.d.ts} +326 -69
- package/dist/index.d.ts +3 -3
- package/dist/index.js +1 -1
- package/dist/list/index.d.ts +1 -1
- package/dist/list/index.js +1 -1
- package/dist/map/index.d.ts +1 -1
- package/dist/map/index.js +1 -1
- package/dist/option/index.d.ts +1 -1
- package/dist/option/index.js +1 -1
- package/dist/set/index.d.ts +1 -1
- package/dist/set/index.js +1 -1
- package/dist/src-CONOwKkM.js +17 -0
- package/dist/try/index.d.ts +1 -1
- package/dist/try/index.js +1 -1
- package/dist/tuple/index.d.ts +1 -1
- package/dist/tuple/index.js +1 -1
- package/package.json +5 -2
- package/dist/Tuple-DKczb-1n.js +0 -1
- package/dist/src-VwDCJTjC.js +0 -20
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as Brand } from "./Brand-bfnGXuum.js";
|
|
2
|
-
import {
|
|
2
|
+
import { d as Type, l as Pipe, o as Serializable, r as Typeable, t as Tuple, u as Foldable } from "./Tuple-8yRldBty.js";
|
|
3
3
|
|
|
4
4
|
//#region src/error/ParseError.d.ts
|
|
5
5
|
declare const ParseError: (message?: string) => Error & {
|
|
@@ -200,6 +200,13 @@ declare const LazyList: (<A extends Type>(iterable: Iterable<A>) => LazyList<A>)
|
|
|
200
200
|
* Create a LazyList from multiple values
|
|
201
201
|
*/
|
|
202
202
|
from: <A extends Type>(...values: A[]) => LazyList<A>;
|
|
203
|
+
/**
|
|
204
|
+
* Reconstruct a LazyList from a JSON envelope emitted by `serialize().toJSON()`
|
|
205
|
+
* or instance `toJSON()`. Verifies `@functype === "LazyList"` when the marker
|
|
206
|
+
* is present (canonical from 1.2.0). The materialized array becomes the new
|
|
207
|
+
* LazyList's backing — laziness can't survive JSON serialization.
|
|
208
|
+
*/
|
|
209
|
+
fromJSON: <A extends Type>(json: string) => LazyList<A>;
|
|
203
210
|
/**
|
|
204
211
|
* Create an infinite LazyList by repeatedly applying a function
|
|
205
212
|
* @example
|
|
@@ -244,6 +251,190 @@ declare const LazyList: (<A extends Type>(iterable: Iterable<A>) => LazyList<A>)
|
|
|
244
251
|
cycle: <A extends Type>(iterable: Iterable<A>) => LazyList<A>;
|
|
245
252
|
};
|
|
246
253
|
//#endregion
|
|
254
|
+
//#region src/serialization/error-envelope.d.ts
|
|
255
|
+
/**
|
|
256
|
+
* Canonical projection of `Error` to JSON, shared by every Serializable type
|
|
257
|
+
* that carries an `Error` in its failure branch (`Try.Failure`, `Task.Err`,
|
|
258
|
+
* `Lazy` with a thrown thunk).
|
|
259
|
+
*
|
|
260
|
+
* Round-trip guarantees:
|
|
261
|
+
* - `err.name` survives (preserves discriminator: `e.name === "TypeError"` works)
|
|
262
|
+
* - `err.message` survives
|
|
263
|
+
* - `err.stack` survives if present at serialize time
|
|
264
|
+
* - `err.cause` survives recursively (arbitrary nesting depth)
|
|
265
|
+
*
|
|
266
|
+
* What does NOT survive:
|
|
267
|
+
* - `instanceof TypeError` and other subclass identity checks (JSON cannot
|
|
268
|
+
* reconstruct user-defined classes without arbitrary code execution).
|
|
269
|
+
* - Custom Error-subclass fields (e.g. `HttpError.status`). The generic
|
|
270
|
+
* projection doesn't know about them; a future registry mechanism may
|
|
271
|
+
* address this.
|
|
272
|
+
*
|
|
273
|
+
* Use `e.name` for discriminator checks across the serialization boundary,
|
|
274
|
+
* not `e instanceof SomeError`.
|
|
275
|
+
*/
|
|
276
|
+
type SerializedError = {
|
|
277
|
+
readonly name: string;
|
|
278
|
+
readonly message: string;
|
|
279
|
+
readonly stack?: string;
|
|
280
|
+
readonly cause?: SerializedError | string;
|
|
281
|
+
};
|
|
282
|
+
/**
|
|
283
|
+
* Project an arbitrary thrown value to the canonical SerializedError shape.
|
|
284
|
+
* Accepts both `Error` instances and non-Error throwables (strings, plain
|
|
285
|
+
* objects, etc.). Non-Error throwables get `name: "NonErrorThrowable"` and
|
|
286
|
+
* the best textual representation we can produce.
|
|
287
|
+
*/
|
|
288
|
+
declare const serializeError: (err: unknown) => SerializedError;
|
|
289
|
+
/**
|
|
290
|
+
* Reconstruct an Error from a SerializedError. The reconstructed Error has
|
|
291
|
+
* the same `name`, `message`, `stack`, and `cause` chain as the original,
|
|
292
|
+
* but its prototype is always `Error.prototype` — subclass identity does
|
|
293
|
+
* not round-trip.
|
|
294
|
+
*
|
|
295
|
+
* A `string` is accepted as a shorthand for `{name: "Error", message: <string>}`,
|
|
296
|
+
* matching what `serializeCause` emits when a `cause` was a bare string.
|
|
297
|
+
*/
|
|
298
|
+
declare const deserializeError: (s: SerializedError | string) => Error;
|
|
299
|
+
//#endregion
|
|
300
|
+
//#region src/serialization/SerializationCompanion.d.ts
|
|
301
|
+
/**
|
|
302
|
+
* Serialization result containing methods for different formats
|
|
303
|
+
*/
|
|
304
|
+
interface SerializationResult {
|
|
305
|
+
/** Serializes to JSON string */
|
|
306
|
+
toJSON: () => string;
|
|
307
|
+
/** Serializes to YAML string */
|
|
308
|
+
toYAML: () => string;
|
|
309
|
+
/** Serializes to base64-encoded binary string */
|
|
310
|
+
toBinary: () => string;
|
|
311
|
+
}
|
|
312
|
+
/**
|
|
313
|
+
* The namespaced marker stamped on every functype envelope. Defends against
|
|
314
|
+
* `_tag` collisions with Effect/fp-ts (which use identical strings like
|
|
315
|
+
* `"Some"`, `"Left"`, `"Success"`). A value WITHOUT this marker is treated
|
|
316
|
+
* as "not ours" by `Serialization.deserialize`.
|
|
317
|
+
*
|
|
318
|
+
* See `docs/proposals/universal-deserialize-changes.md` Change 0 for the
|
|
319
|
+
* full rationale.
|
|
320
|
+
*/
|
|
321
|
+
declare const FUNCTYPE_MARKER: "@functype";
|
|
322
|
+
/**
|
|
323
|
+
* Shape of every functype JSON envelope. The marker identifies the type,
|
|
324
|
+
* `_tag` (when present) discriminates variants within that type, and the
|
|
325
|
+
* remaining payload fields are type-specific (`value` for canonical cases,
|
|
326
|
+
* `error` for failure branches, etc.).
|
|
327
|
+
*/
|
|
328
|
+
type FunctypeEnvelope = {
|
|
329
|
+
readonly [FUNCTYPE_MARKER]: string;
|
|
330
|
+
readonly _tag?: string;
|
|
331
|
+
readonly [key: string]: unknown;
|
|
332
|
+
};
|
|
333
|
+
/**
|
|
334
|
+
* Build the canonical `{@functype, _tag, value}` envelope OBJECT used by both
|
|
335
|
+
* the instance `toJSON()` (which returns it directly so native JSON.stringify
|
|
336
|
+
* can recurse) and the `serialize().toJSON()` method (which stringifies it).
|
|
337
|
+
*
|
|
338
|
+
* `_tag` is always emitted — variant-less types pass the same string for
|
|
339
|
+
* marker and tag (default behavior when tag is omitted). Keeping `_tag`
|
|
340
|
+
* across the board preserves back-compat for readers that did
|
|
341
|
+
* `if (parsed._tag === "List")` against 1.1.0 envelopes.
|
|
342
|
+
*
|
|
343
|
+
* @param marker - The `@functype` type marker, e.g. `"Either"`, `"Option"`.
|
|
344
|
+
* @param tag - The variant discriminator, e.g. `"Right"`, `"Some"`. Defaults
|
|
345
|
+
* to `marker` for types without variants (List, Map, etc.).
|
|
346
|
+
* @param value - The payload.
|
|
347
|
+
*/
|
|
348
|
+
declare const envelope: (marker: string, tag: string | undefined, value: unknown) => FunctypeEnvelope;
|
|
349
|
+
/**
|
|
350
|
+
* Build a non-canonical envelope where the payload doesn't fit the standard
|
|
351
|
+
* `{value}` shape — e.g. `Try.Failure` carries `{error: SerializedError}`,
|
|
352
|
+
* `Lazy`-with-thrown-thunk carries the same.
|
|
353
|
+
*
|
|
354
|
+
* @param marker - The `@functype` type marker.
|
|
355
|
+
* @param tag - The variant discriminator (may be the same as marker for
|
|
356
|
+
* variant-less types).
|
|
357
|
+
* @param fields - Additional payload fields merged into the envelope.
|
|
358
|
+
*/
|
|
359
|
+
declare const taggedEnvelope: (marker: string, tag: string, fields: Record<string, unknown>) => FunctypeEnvelope;
|
|
360
|
+
/**
|
|
361
|
+
* Creates a serializer for the canonical envelope shape, with the `@functype`
|
|
362
|
+
* marker stamped at the top level (Change 0 of the 1.2.0 universal-deserialize
|
|
363
|
+
* work). Two forms:
|
|
364
|
+
*
|
|
365
|
+
* createSerializer(marker, value) // variant-less types (List, Map, …)
|
|
366
|
+
* createSerializer(marker, tag, value) // variants (Either, Option, …)
|
|
367
|
+
*
|
|
368
|
+
* Variant-less envelopes are `{"@functype": marker, value}`. Variant envelopes
|
|
369
|
+
* are `{"@functype": marker, _tag: tag, value}`.
|
|
370
|
+
*/
|
|
371
|
+
declare function createSerializer(marker: string, value: unknown): SerializationResult;
|
|
372
|
+
declare function createSerializer(marker: string, tag: string, value: unknown): SerializationResult;
|
|
373
|
+
/**
|
|
374
|
+
* Creates a serializer for non-canonical envelopes whose payload doesn't
|
|
375
|
+
* fit the `{value}` shape — e.g. failure branches that carry a structured
|
|
376
|
+
* `SerializedError`. The envelope still carries the `@functype` marker
|
|
377
|
+
* and `_tag` discriminator.
|
|
378
|
+
*
|
|
379
|
+
* @param marker - The `@functype` type marker.
|
|
380
|
+
* @param tag - The variant discriminator.
|
|
381
|
+
* @param fields - The payload fields (merged after marker + tag).
|
|
382
|
+
*/
|
|
383
|
+
declare const createTaggedSerializer: (marker: string, tag: string, fields: Record<string, unknown>) => SerializationResult;
|
|
384
|
+
/**
|
|
385
|
+
* @deprecated Use `createTaggedSerializer` instead. Retained for backwards
|
|
386
|
+
* compatibility with any external callers; will be removed in a
|
|
387
|
+
* future major. The single internal caller (`Try.Failure`) has
|
|
388
|
+
* been migrated to `createTaggedSerializer`.
|
|
389
|
+
*
|
|
390
|
+
* Creates a serializer for complex objects with custom serialization logic.
|
|
391
|
+
* Note: this variant does NOT stamp the `@functype` marker — callers must
|
|
392
|
+
* include it in `data` themselves if they want envelope dispatch to work.
|
|
393
|
+
*/
|
|
394
|
+
declare const createCustomSerializer: (data: Record<string, unknown>) => SerializationResult;
|
|
395
|
+
/**
|
|
396
|
+
* Generic deserializer from JSON. The `reconstructor` receives the full
|
|
397
|
+
* parsed envelope including any `@functype` marker; per-type companions
|
|
398
|
+
* verify the marker matches their expected value.
|
|
399
|
+
*/
|
|
400
|
+
declare const fromJSON: <T>(json: string, reconstructor: (parsed: {
|
|
401
|
+
_tag?: string;
|
|
402
|
+
[key: string]: unknown;
|
|
403
|
+
}) => T) => T;
|
|
404
|
+
/**
|
|
405
|
+
* Generic deserializer from YAML (simple format)
|
|
406
|
+
* @param yaml - The YAML string to parse
|
|
407
|
+
* @param reconstructor - Function to reconstruct the type from parsed data
|
|
408
|
+
* @returns Reconstructed instance
|
|
409
|
+
*/
|
|
410
|
+
declare const fromYAML: <T>(yaml: string, reconstructor: (parsed: {
|
|
411
|
+
_tag?: string;
|
|
412
|
+
[key: string]: unknown;
|
|
413
|
+
}) => T) => T;
|
|
414
|
+
/**
|
|
415
|
+
* Generic deserializer from binary (base64-encoded JSON)
|
|
416
|
+
* @param binary - The base64-encoded binary string
|
|
417
|
+
* @param reconstructor - Function to reconstruct the type from parsed data
|
|
418
|
+
* @returns Reconstructed instance
|
|
419
|
+
*/
|
|
420
|
+
declare const fromBinary: <T>(binary: string, reconstructor: (parsed: {
|
|
421
|
+
_tag?: string;
|
|
422
|
+
[key: string]: unknown;
|
|
423
|
+
}) => T) => T;
|
|
424
|
+
/**
|
|
425
|
+
* Creates companion serialization methods for a type
|
|
426
|
+
* @param reconstructor - Function to reconstruct the type from parsed data
|
|
427
|
+
* @returns Companion methods object with fromJSON, fromYAML, and fromBinary
|
|
428
|
+
*/
|
|
429
|
+
declare const createSerializationCompanion: <T>(reconstructor: (parsed: {
|
|
430
|
+
_tag?: string;
|
|
431
|
+
[key: string]: unknown;
|
|
432
|
+
}) => T) => {
|
|
433
|
+
fromJSON: (json: string) => T;
|
|
434
|
+
fromYAML: (yaml: string) => T;
|
|
435
|
+
fromBinary: (binary: string) => T;
|
|
436
|
+
};
|
|
437
|
+
//#endregion
|
|
247
438
|
//#region src/typeclass/ContainerOps.d.ts
|
|
248
439
|
/**
|
|
249
440
|
* Universal operations that work on any container (single-value or collection).
|
|
@@ -570,6 +761,21 @@ interface Try<out T> extends FunctypeSum<T, TypeNames>, Extractable<T>, Pipe<T>,
|
|
|
570
761
|
_tag: TypeNames;
|
|
571
762
|
value: T | Error;
|
|
572
763
|
};
|
|
764
|
+
/**
|
|
765
|
+
* Custom JSON serialization. Success emits `{"@functype":"Try","_tag":"Success","value":T}`.
|
|
766
|
+
* Failure emits `{"@functype":"Try","_tag":"Failure","error":SerializedError}` where
|
|
767
|
+
* SerializedError captures `name`, `message`, `stack`, and the full `cause` chain —
|
|
768
|
+
* `e.name` survives round-trip but `instanceof SomeError` does not.
|
|
769
|
+
*/
|
|
770
|
+
toJSON(): {
|
|
771
|
+
"@functype": "Try";
|
|
772
|
+
_tag: "Success";
|
|
773
|
+
value: T;
|
|
774
|
+
} | {
|
|
775
|
+
"@functype": "Try";
|
|
776
|
+
_tag: "Failure";
|
|
777
|
+
error: SerializedError;
|
|
778
|
+
};
|
|
573
779
|
}
|
|
574
780
|
declare const Try: (<T>(f: () => T) => Try<T>) & {
|
|
575
781
|
/**
|
|
@@ -1422,6 +1628,21 @@ interface TaskOutcome<out T> extends FunctypeBase<T, "Ok" | "Err">, Extractable<
|
|
|
1422
1628
|
Ok: (value: T) => U;
|
|
1423
1629
|
Err: (error: Throwable) => U;
|
|
1424
1630
|
}) => U;
|
|
1631
|
+
/**
|
|
1632
|
+
* Custom JSON serialization. Ok emits `{"@functype":"Task","_tag":"Ok","value":T}`.
|
|
1633
|
+
* Err emits `{"@functype":"Task","_tag":"Err","error":SerializedError}` capturing the
|
|
1634
|
+
* Throwable's name, message, stack, and cause chain. See error-envelope.ts —
|
|
1635
|
+
* `instanceof` does NOT survive round-trip but `error.name` does.
|
|
1636
|
+
*/
|
|
1637
|
+
toJSON(): {
|
|
1638
|
+
"@functype": "Task";
|
|
1639
|
+
_tag: "Ok";
|
|
1640
|
+
value: T;
|
|
1641
|
+
} | {
|
|
1642
|
+
"@functype": "Task";
|
|
1643
|
+
_tag: "Err";
|
|
1644
|
+
error: SerializedError;
|
|
1645
|
+
};
|
|
1425
1646
|
}
|
|
1426
1647
|
interface Ok<out T> extends TaskOutcome<T> {
|
|
1427
1648
|
readonly _tag: "Ok";
|
|
@@ -1527,6 +1748,15 @@ declare const Task$1: (<T = unknown>(params?: TaskParams) => {
|
|
|
1527
1748
|
* Preferred for new code
|
|
1528
1749
|
*/
|
|
1529
1750
|
err: <T>(error: unknown, data?: unknown, params?: TaskParams) => Err<T>;
|
|
1751
|
+
/**
|
|
1752
|
+
* Reconstruct a TaskOutcome from a JSON envelope emitted by `serialize().toJSON()`
|
|
1753
|
+
* or instance `toJSON()`. Verifies `@functype === "Task"` and dispatches on `_tag`.
|
|
1754
|
+
*
|
|
1755
|
+
* Err reconstruction goes through `deserializeError` so `name`/`message`/`stack`/`cause`
|
|
1756
|
+
* survive; the resulting Throwable carries the deserialized Error as its underlying
|
|
1757
|
+
* error (subclass identity does NOT round-trip — see error-envelope.ts).
|
|
1758
|
+
*/
|
|
1759
|
+
fromJSON: <T>(json: string) => TaskOutcome<T>;
|
|
1530
1760
|
/**
|
|
1531
1761
|
* Create TaskOutcome from Either
|
|
1532
1762
|
* @param either - Either to convert
|
|
@@ -3926,13 +4156,39 @@ interface Lazy<out T extends Type> extends FunctypeBase<T, "Lazy">, Extractable<
|
|
|
3926
4156
|
*/
|
|
3927
4157
|
toString(): string;
|
|
3928
4158
|
/**
|
|
3929
|
-
* Converts the Lazy to a value object
|
|
3930
|
-
*
|
|
4159
|
+
* Converts the Lazy to a value object.
|
|
4160
|
+
*
|
|
4161
|
+
* **Forces the thunk** as a side effect — Lazy serialization (and projection
|
|
4162
|
+
* to a plain value object) cannot represent an unevaluated thunk in JSON;
|
|
4163
|
+
* forcing is the only way to produce a complete projection. If the thunk
|
|
4164
|
+
* threw, the failure is captured in the `error` field (real Error, with
|
|
4165
|
+
* full prototype intact for in-memory inspection — `toJSON` projects to
|
|
4166
|
+
* `SerializedError` for the wire).
|
|
4167
|
+
*
|
|
4168
|
+
* Changed in 1.2.0 — pre-1.2.0 Lazy emitted `{_tag, evaluated, value?}`
|
|
4169
|
+
* without forcing. See `docs/proposals/serializable-audit-q1-q2.md`.
|
|
3931
4170
|
*/
|
|
3932
4171
|
toValue(): {
|
|
3933
4172
|
_tag: "Lazy";
|
|
3934
|
-
|
|
3935
|
-
|
|
4173
|
+
value: T;
|
|
4174
|
+
} | {
|
|
4175
|
+
_tag: "Lazy";
|
|
4176
|
+
error: Error;
|
|
4177
|
+
};
|
|
4178
|
+
/**
|
|
4179
|
+
* Custom JSON serialization. Forces the thunk (see `toValue` for the
|
|
4180
|
+
* side-effect contract). Emits `{"@functype":"Lazy","_tag":"Lazy","value":T}`
|
|
4181
|
+
* on success, or `{"@functype":"Lazy","_tag":"Lazy","error":SerializedError}`
|
|
4182
|
+
* if the thunk threw — see error-envelope.ts for round-trip semantics.
|
|
4183
|
+
*/
|
|
4184
|
+
toJSON(): {
|
|
4185
|
+
"@functype": "Lazy";
|
|
4186
|
+
_tag: "Lazy";
|
|
4187
|
+
value: T;
|
|
4188
|
+
} | {
|
|
4189
|
+
"@functype": "Lazy";
|
|
4190
|
+
_tag: "Lazy";
|
|
4191
|
+
error: SerializedError;
|
|
3936
4192
|
};
|
|
3937
4193
|
}
|
|
3938
4194
|
/**
|
|
@@ -4018,6 +4274,24 @@ declare const Lazy: (<T extends Type>(thunk: () => T) => Lazy<T>) & {
|
|
|
4018
4274
|
* @returns A new Lazy instance that throws the error
|
|
4019
4275
|
*/
|
|
4020
4276
|
fail: <T extends Type>(error: unknown) => Lazy<T>;
|
|
4277
|
+
/**
|
|
4278
|
+
* Creates an already-evaluated Lazy. Used by `fromJSON` to reconstruct a
|
|
4279
|
+
* Lazy whose thunk was forced at serialize time — there is no original
|
|
4280
|
+
* thunk to defer because a closure cannot be JSON-serialized.
|
|
4281
|
+
*
|
|
4282
|
+
* Functionally equivalent to `Lazy.fromValue` but reads with intent at
|
|
4283
|
+
* the call site.
|
|
4284
|
+
*/
|
|
4285
|
+
evaluated: <T extends Type>(value: T) => Lazy<T>;
|
|
4286
|
+
/**
|
|
4287
|
+
* Reconstruct a Lazy from a JSON envelope emitted by `serialize().toJSON()`
|
|
4288
|
+
* or instance `toJSON()`. Verifies `@functype === "Lazy"`. Success envelopes
|
|
4289
|
+
* become already-evaluated Lazies via `Lazy.evaluated`; failure envelopes
|
|
4290
|
+
* become Lazies whose forcing rethrows the deserialized Error (see
|
|
4291
|
+
* error-envelope.ts — `instanceof SomeError` does NOT survive but `name`
|
|
4292
|
+
* does).
|
|
4293
|
+
*/
|
|
4294
|
+
fromJSON: <T extends Type>(json: string) => Lazy<T>;
|
|
4021
4295
|
};
|
|
4022
4296
|
//#endregion
|
|
4023
4297
|
//#region src/traversable/Traversable.d.ts
|
|
@@ -4422,75 +4696,43 @@ declare const Ref: (<A extends Type>(initial: A) => Ref<A>) & {
|
|
|
4422
4696
|
*/
|
|
4423
4697
|
of: <A extends Type>(initial: A) => Ref<A>;
|
|
4424
4698
|
};
|
|
4425
|
-
|
|
4426
|
-
|
|
4427
|
-
/**
|
|
4428
|
-
* Serialization result containing methods for different formats
|
|
4429
|
-
*/
|
|
4430
|
-
interface SerializationResult {
|
|
4431
|
-
/** Serializes to JSON string */
|
|
4432
|
-
toJSON: () => string;
|
|
4433
|
-
/** Serializes to YAML string */
|
|
4434
|
-
toYAML: () => string;
|
|
4435
|
-
/** Serializes to base64-encoded binary string */
|
|
4436
|
-
toBinary: () => string;
|
|
4699
|
+
declare namespace Serialization_d_exports {
|
|
4700
|
+
export { deserialize, isFunctypeValue, serialize };
|
|
4437
4701
|
}
|
|
4438
4702
|
/**
|
|
4439
|
-
*
|
|
4440
|
-
*
|
|
4441
|
-
*
|
|
4442
|
-
*
|
|
4443
|
-
|
|
4444
|
-
|
|
4445
|
-
|
|
4446
|
-
*
|
|
4447
|
-
*
|
|
4448
|
-
*
|
|
4449
|
-
|
|
4450
|
-
declare const createCustomSerializer: (data: Record<string, unknown>) => SerializationResult;
|
|
4451
|
-
/**
|
|
4452
|
-
* Generic deserializer from JSON
|
|
4453
|
-
* @param json - The JSON string to parse
|
|
4454
|
-
* @param reconstructor - Function to reconstruct the type from parsed data
|
|
4455
|
-
* @returns Reconstructed instance
|
|
4456
|
-
*/
|
|
4457
|
-
declare const fromJSON: <T>(json: string, reconstructor: (parsed: {
|
|
4458
|
-
_tag: string;
|
|
4459
|
-
[key: string]: unknown;
|
|
4460
|
-
}) => T) => T;
|
|
4461
|
-
/**
|
|
4462
|
-
* Generic deserializer from YAML (simple format)
|
|
4463
|
-
* @param yaml - The YAML string to parse
|
|
4464
|
-
* @param reconstructor - Function to reconstruct the type from parsed data
|
|
4465
|
-
* @returns Reconstructed instance
|
|
4703
|
+
* Reconstruct any value from a JSON string. Walks the parsed structure and
|
|
4704
|
+
* rebuilds functype envelopes via the dispatch table. Returns a `Try` so
|
|
4705
|
+
* malformed JSON or unknown markers are expressible values rather than
|
|
4706
|
+
* thrown — matches the functype convention for expected-failure paths.
|
|
4707
|
+
*
|
|
4708
|
+
* @example
|
|
4709
|
+
* const result = Serialization.deserialize('{"@functype":"Either","_tag":"Right","value":5}')
|
|
4710
|
+
* result.fold(e => console.error(e), v => console.log(v)) // → Right(5)
|
|
4711
|
+
*
|
|
4712
|
+
* // Plain (non-functype) values pass through:
|
|
4713
|
+
* Serialization.deserialize('{"name":"alice","age":30}') // → Success({name, age})
|
|
4466
4714
|
*/
|
|
4467
|
-
declare const
|
|
4468
|
-
_tag: string;
|
|
4469
|
-
[key: string]: unknown;
|
|
4470
|
-
}) => T) => T;
|
|
4715
|
+
declare const deserialize: (json: string) => Try<unknown>;
|
|
4471
4716
|
/**
|
|
4472
|
-
*
|
|
4473
|
-
*
|
|
4474
|
-
*
|
|
4475
|
-
*
|
|
4717
|
+
* Serialize any value to a JSON string. Thin convenience over `JSON.stringify`
|
|
4718
|
+
* — functype instances self-stringify via their instance `toJSON()` method,
|
|
4719
|
+
* which emits the `@functype`-marked envelope. Nested functype values
|
|
4720
|
+
* embedded in plain objects/arrays serialize correctly via the standard
|
|
4721
|
+
* JSON.stringify protocol with no walker needed.
|
|
4722
|
+
*
|
|
4723
|
+
* `undefined` is converted to `null` (matching the convention DBOS and
|
|
4724
|
+
* SuperJSON use; `JSON.stringify(undefined)` returns the string `undefined`
|
|
4725
|
+
* which is not valid JSON).
|
|
4476
4726
|
*/
|
|
4477
|
-
declare const
|
|
4478
|
-
_tag: string;
|
|
4479
|
-
[key: string]: unknown;
|
|
4480
|
-
}) => T) => T;
|
|
4727
|
+
declare const serialize: (value: unknown) => string;
|
|
4481
4728
|
/**
|
|
4482
|
-
*
|
|
4483
|
-
*
|
|
4484
|
-
*
|
|
4729
|
+
* Runtime guard: is this a live functype Serializable? Checks for the
|
|
4730
|
+
* `serialize()` method plus the `_tag` field that every Serializable instance
|
|
4731
|
+
* carries. Use this when wrapping `serialize`/`deserialize` in a host
|
|
4732
|
+
* serializer that needs to distinguish functype values from foreign data
|
|
4733
|
+
* (e.g. `isApplicable` in a DBOS recipe).
|
|
4485
4734
|
*/
|
|
4486
|
-
declare const
|
|
4487
|
-
_tag: string;
|
|
4488
|
-
[key: string]: unknown;
|
|
4489
|
-
}) => T) => {
|
|
4490
|
-
fromJSON: (json: string) => T;
|
|
4491
|
-
fromYAML: (yaml: string) => T;
|
|
4492
|
-
fromBinary: (binary: string) => T;
|
|
4493
|
-
};
|
|
4735
|
+
declare const isFunctypeValue: (v: unknown) => v is Serializable<unknown>;
|
|
4494
4736
|
//#endregion
|
|
4495
4737
|
//#region src/set/Set.d.ts
|
|
4496
4738
|
/**
|
|
@@ -4841,6 +5083,16 @@ interface Option<out T extends Type> extends Functype<T, "Some" | "None">, Promi
|
|
|
4841
5083
|
_tag: "Some" | "None";
|
|
4842
5084
|
value: T;
|
|
4843
5085
|
};
|
|
5086
|
+
/**
|
|
5087
|
+
* Custom JSON serialization producing the canonical `@functype`-marked
|
|
5088
|
+
* envelope so native `JSON.stringify` recursion (e.g. inside a plain
|
|
5089
|
+
* object) emits a round-trip-able shape.
|
|
5090
|
+
*/
|
|
5091
|
+
toJSON(): {
|
|
5092
|
+
"@functype": "Option";
|
|
5093
|
+
_tag: "Some" | "None";
|
|
5094
|
+
value: T | null;
|
|
5095
|
+
};
|
|
4844
5096
|
/**
|
|
4845
5097
|
* Pattern matches over the Option, applying a handler function based on the variant
|
|
4846
5098
|
* @param patterns - Object with handler functions for Some and None variants
|
|
@@ -5205,9 +5457,14 @@ interface EitherBase<out L extends Type, out R extends Type> extends FunctypeSum
|
|
|
5205
5457
|
value: L | R;
|
|
5206
5458
|
};
|
|
5207
5459
|
/**
|
|
5208
|
-
* Custom JSON serialization that excludes getter properties
|
|
5460
|
+
* Custom JSON serialization that excludes getter properties.
|
|
5461
|
+
* Emits the canonical functype envelope with `@functype: "Either"` so
|
|
5462
|
+
* native `JSON.stringify` recursion (e.g. inside a plain object body)
|
|
5463
|
+
* produces a marker-bearing envelope that survives a round-trip through
|
|
5464
|
+
* `Serialization.deserialize`.
|
|
5209
5465
|
*/
|
|
5210
5466
|
toJSON(): {
|
|
5467
|
+
"@functype": "Either";
|
|
5211
5468
|
_tag: "Left" | "Right";
|
|
5212
5469
|
value: L | R;
|
|
5213
5470
|
};
|
|
@@ -5512,4 +5769,4 @@ interface FailureErrorType extends Error {
|
|
|
5512
5769
|
}
|
|
5513
5770
|
declare const FailureError: (cause: Error, message?: string) => FailureErrorType;
|
|
5514
5771
|
//#endregion
|
|
5515
|
-
export {
|
|
5772
|
+
export { HKT as $, reduceWiden as $n, TaskErrorInfo as $t, Collection as A, Cond as An, LayerError as At, Serialization_d_exports as B, NonEmptyString as Bn, FieldValidation as Bt, isRight as C, isTaggedThrowable as Cn, Extractable as Cr, IO as Ct, Functype as D, Base as Dn, ParseError as Dr, TimeoutError as Dt, FunctypeSum as E, ThrowableType as En, Doable as Er, Task as Et, Some as F, BoundedNumber as Fn, Context as Ft, ESMap as G, UUID as Gn, ErrorCode as Gt, Obj as H, PatternString as Hn, Validation as Ht, Stack as I, BoundedString as In, ContextServices as It, KVTraversable as J, ValidatedBrandCompanion as Jn, TypedError as Jt, ESMapType as K, UrlString as Kn, ErrorMessage as Kt, Valuable as L, EmailAddress as Ln, HasService as Lt, None as M, InstanceType as Mn, LayerOutput as Mt, Option as N, isCompanion as Nn, Exit as Nt, FunctypeBase as O, Match as On, UIO as Ot, OptionConstructor as P, Companion as Pn, ExitTag as Pt, EitherKind as Q, reduceRightWiden as Qn, ErrorWithTaskInfo as Qt, ValuableParams as R, ISO8601Date as Rn, Tag as Rt, isLeft as S, createCancellationTokenSource as Sn, LazyList as Sr, TestContext as St, tryCatchAsync as T, Throwable as Tn, DoResult as Tr, RIO as Tt, Matchable as U, PositiveInteger as Un, ValidationRule as Ut, Ref as V, NonNegativeNumber as Vn, FormValidation as Vt, MatchableUtils as W, PositiveNumber as Wn, Validator as Wt, Lazy as X, TypeNames as Xn, ErrorChainElement as Xt, Traversable as Y, Try as Yn, TypedErrorContext as Yt, Identity as Z, Widen as Zn, ErrorFormatterOptions as Zt, Right as _, TaskMetadata as _n, fromYAML as _r, HttpStatusError as _t, EmptyListError as a, DecoderError as an, CollectionOps as ar, FoldableUtils as at, TypeCheckLeft as b, TaskResult as bn, deserializeError as br, TestClock as bt, LeftError as c, Async as cn, FunctypeEnvelope as cr, HttpClientConfig as ct, isDoCapable as d, Err as dn, createSerializationCompanion as dr, HttpRequestView as dt, createErrorSerializer as en, Promisable as er, Kind as et, unwrap as f, Ok as fn, createSerializer as fr, HttpResponse as ft, LeftOf as g, TaskFailure as gn, fromJSON as gr, HttpMethod as gt, Left as h, Task$1 as hn, fromBinary as hr, HttpError as ht, DoGenerator as i, Decoder as in, Monad as ir, UniversalContainer as it, List as j, CompanionMethods as jn, LayerInput as jt, FunctypeCollection as k, UntypedMatch as kn, Layer as kt, LeftErrorType as l, CancellationToken as ln, SerializationResult as lr, HttpMethodOptions as lt, EitherBase as m, TaggedThrowable as mn, envelope as mr, DecodeError as mt, Do as n, formatStackTrace as nn, AsyncMonad as nr, OptionKind as nt, FailureError as o, DecoderErrorComposite as on, ContainerOps as or, Http as ot, Either as p, Sync as pn, createTaggedSerializer as pr, ParseMode as pt, Map$1 as q, ValidatedBrand as qn, ErrorStatus as qt, DoAsync as r, safeStringify as rn, Functor as rr, TryKind as rt, FailureErrorType as s, DecoderErrorLeaf as sn, FUNCTYPE_MARKER as sr, HttpClient as st, $ as t, formatError as tn, Applicative as tr, ListKind as tt, NoneError as u, CancellationTokenSource as un, createCustomSerializer as ur, HttpRequestOptions as ut, RightOf as v, TaskOutcome as vn, taggedEnvelope as vr, NetworkError as vt, tryCatch as w, NAME as wn, isExtractable as wr, InterruptedError as wt, TypeCheckRight as x, TaskSuccess as xn, serializeError as xr, TestClockTag as xt, TestEither as y, TaskParams as yn, SerializedError as yr, ResponseDecodeError as yt, Set as z, IntegerNumber as zn, TagService as zt };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { a as ExtractBrand, c as hasBrand, i as BrandedString, l as unwrapBrand, n as BrandedBoolean, o as Unwrap, r as BrandedNumber, s as createBrander, t as Brand } from "./Brand-bfnGXuum.js";
|
|
2
|
-
import { $ as
|
|
3
|
-
import { a as isTypeable, c as
|
|
4
|
-
export { $, type Applicative, Async, type AsyncMonad, Base, BoundedNumber, BoundedString, Brand, BrandedBoolean, type BrandedBoolean as BrandedBooleanType, BrandedNumber, type BrandedNumber as BrandedNumberType, BrandedString, type BrandedString as BrandedStringType, CancellationToken, CancellationTokenSource, Collection, type CollectionOps, Companion, CompanionMethods, Cond, type ContainerOps, Context, type Context as ContextType, type ContextServices, type DecodeError, Decoder, DecoderError, type DecoderErrorComposite, type DecoderErrorLeaf, Do, DoAsync, DoGenerator, type DoResult, type Doable, ESMap, ESMapType, Either, EitherBase, EitherKind, EmailAddress, EmptyListError, Err, ErrorChainElement, ErrorCode, ErrorFormatterOptions, ErrorMessage, ErrorStatus, ErrorWithTaskInfo, Exit, type Exit as ExitType, type ExitTag, type ExtractBrand, ExtractTag, type Extractable, FailureError, FailureErrorType, FieldValidation, Foldable, FoldableUtils, FormValidation, type Functor, Functype, FunctypeBase, FunctypeCollection, FunctypeSum, HKT, type HasService, Http, HttpClient, type HttpClientConfig, type HttpError, HttpError as HttpErrors, type HttpMethod, type HttpMethodOptions, type HttpRequestOptions, type HttpRequestView, type HttpResponse, type HttpStatusError, IO, type IO as IOType, type Task as IOTask, ISO8601Date, Identity, InstanceType, IntegerNumber, InterruptedError, KVTraversable, Kind, Layer, type Layer as LayerType, type LayerError, type LayerInput, type LayerOutput, Lazy, type Lazy as LazyType, LazyList, Left, LeftError, LeftErrorType, LeftOf, List, ListKind, Map, Match, type Matchable, MatchableUtils, type Monad, NAME, type NetworkError, NonEmptyString, NonNegativeNumber, None, NoneError, Obj, Ok, Option, OptionConstructor, OptionKind, ParseError, type ParseMode, PatternString, Pipe, PositiveInteger, PositiveNumber, type Promisable, type RIO, Ref, type Ref as RefType, type ResponseDecodeError, Right, RightOf, Serializable, SerializationMethods, SerializationResult, Set, Some, Stack, Sync, Tag, type Tag as TagType, type TagService, TaggedThrowable, Task$1 as Task, TaskErrorInfo, TaskFailure, TaskMetadata, TaskOutcome, TaskParams, TaskResult, TaskSuccess, TestClock, type TestClock as TestClockType, TestClockTag, TestContext, type TestContext as TestContextType, TestEither, Throwable, ThrowableType, TimeoutError, Traversable, Try, TryKind, Tuple, Type, TypeCheckLeft, TypeCheckRight, TypeNames, Typeable, TypeableParams, TypedError, TypedErrorContext, type UIO, UUID, UniversalContainer, UntypedMatch, type Unwrap, UrlString, ValidatedBrand, type ValidatedBrand as ValidatedBrandType, type ValidatedBrandCompanion, Validation, ValidationRule, Validator, Valuable, ValuableParams, type Widen, createBrander, createCancellationTokenSource, createCustomSerializer, createErrorSerializer, createSerializationCompanion, createSerializer, formatError, formatStackTrace, fromBinary, fromJSON, fromYAML, hasBrand, isCompanion, isDoCapable, isExtractable, isLeft, isRight, isTaggedThrowable, isTypeable, reduceRightWiden, reduceWiden, safeStringify, tryCatch, tryCatchAsync, unwrap, unwrapBrand };
|
|
2
|
+
import { $ as HKT, $n as reduceWiden, $t as TaskErrorInfo, A as Collection, An as Cond, At as LayerError, B as Serialization_d_exports, Bn as NonEmptyString, Bt as FieldValidation, C as isRight, Cn as isTaggedThrowable, Cr as Extractable, Ct as IO, D as Functype, Dn as Base, Dr as ParseError, Dt as TimeoutError, E as FunctypeSum, En as ThrowableType, Er as Doable, Et as Task, F as Some, Fn as BoundedNumber, Ft as Context, G as ESMap, Gn as UUID, Gt as ErrorCode, H as Obj, Hn as PatternString, Ht as Validation, I as Stack, In as BoundedString, It as ContextServices, J as KVTraversable, Jn as ValidatedBrandCompanion, Jt as TypedError, K as ESMapType, Kn as UrlString, Kt as ErrorMessage, L as Valuable, Ln as EmailAddress, Lt as HasService, M as None, Mn as InstanceType, Mt as LayerOutput, N as Option, Nn as isCompanion, Nt as Exit, O as FunctypeBase, On as Match, Ot as UIO, P as OptionConstructor, Pn as Companion, Pt as ExitTag, Q as EitherKind, Qn as reduceRightWiden, Qt as ErrorWithTaskInfo, R as ValuableParams, Rn as ISO8601Date, Rt as Tag, S as isLeft, Sn as createCancellationTokenSource, Sr as LazyList, St as TestContext, T as tryCatchAsync, Tn as Throwable, Tr as DoResult, Tt as RIO, U as Matchable, Un as PositiveInteger, Ut as ValidationRule, V as Ref, Vn as NonNegativeNumber, Vt as FormValidation, W as MatchableUtils, Wn as PositiveNumber, Wt as Validator, X as Lazy, Xn as TypeNames, Xt as ErrorChainElement, Y as Traversable, Yn as Try, Yt as TypedErrorContext, Z as Identity, Zn as Widen, Zt as ErrorFormatterOptions, _ as Right, _n as TaskMetadata, _r as fromYAML, _t as HttpStatusError, a as EmptyListError, an as DecoderError, ar as CollectionOps, at as FoldableUtils, b as TypeCheckLeft, bn as TaskResult, br as deserializeError, bt as TestClock, c as LeftError, cn as Async, cr as FunctypeEnvelope, ct as HttpClientConfig, d as isDoCapable, dn as Err, dr as createSerializationCompanion, dt as HttpRequestView, en as createErrorSerializer, er as Promisable, et as Kind, f as unwrap, fn as Ok, fr as createSerializer, ft as HttpResponse, g as LeftOf, gn as TaskFailure, gr as fromJSON, gt as HttpMethod, h as Left, hn as Task$1, hr as fromBinary, ht as HttpError, i as DoGenerator, in as Decoder, ir as Monad, it as UniversalContainer, j as List, jn as CompanionMethods, jt as LayerInput, k as FunctypeCollection, kn as UntypedMatch, kt as Layer, l as LeftErrorType, ln as CancellationToken, lr as SerializationResult, lt as HttpMethodOptions, m as EitherBase, mn as TaggedThrowable, mr as envelope, mt as DecodeError, n as Do, nn as formatStackTrace, nr as AsyncMonad, nt as OptionKind, o as FailureError, on as DecoderErrorComposite, or as ContainerOps, ot as Http, p as Either, pn as Sync, pr as createTaggedSerializer, pt as ParseMode, q as Map, qn as ValidatedBrand, qt as ErrorStatus, r as DoAsync, rn as safeStringify, rr as Functor, rt as TryKind, s as FailureErrorType, sn as DecoderErrorLeaf, sr as FUNCTYPE_MARKER, st as HttpClient, t as $, tn as formatError, tr as Applicative, tt as ListKind, u as NoneError, un as CancellationTokenSource, ur as createCustomSerializer, ut as HttpRequestOptions, v as RightOf, vn as TaskOutcome, vr as taggedEnvelope, vt as NetworkError, w as tryCatch, wn as NAME, wr as isExtractable, wt as InterruptedError, x as TypeCheckRight, xn as TaskSuccess, xr as serializeError, xt as TestClockTag, y as TestEither, yn as TaskParams, yr as SerializedError, yt as ResponseDecodeError, z as Set, zn as IntegerNumber, zt as TagService } from "./index-DAKubqXO.js";
|
|
3
|
+
import { a as isTypeable, c as SerializationMethods, d as Type, i as TypeableParams, l as Pipe, n as ExtractTag, o as Serializable, r as Typeable, s as SerializableEnvelope, t as Tuple, u as Foldable } from "./Tuple-8yRldBty.js";
|
|
4
|
+
export { $, type Applicative, Async, type AsyncMonad, Base, BoundedNumber, BoundedString, Brand, BrandedBoolean, type BrandedBoolean as BrandedBooleanType, BrandedNumber, type BrandedNumber as BrandedNumberType, BrandedString, type BrandedString as BrandedStringType, CancellationToken, CancellationTokenSource, Collection, type CollectionOps, Companion, CompanionMethods, Cond, type ContainerOps, Context, type Context as ContextType, type ContextServices, type DecodeError, Decoder, DecoderError, type DecoderErrorComposite, type DecoderErrorLeaf, Do, DoAsync, DoGenerator, type DoResult, type Doable, ESMap, ESMapType, Either, EitherBase, EitherKind, EmailAddress, EmptyListError, Err, ErrorChainElement, ErrorCode, ErrorFormatterOptions, ErrorMessage, ErrorStatus, ErrorWithTaskInfo, Exit, type Exit as ExitType, type ExitTag, type ExtractBrand, ExtractTag, type Extractable, FUNCTYPE_MARKER, FailureError, FailureErrorType, FieldValidation, Foldable, FoldableUtils, FormValidation, type Functor, Functype, FunctypeBase, FunctypeCollection, FunctypeEnvelope, FunctypeSum, HKT, type HasService, Http, HttpClient, type HttpClientConfig, type HttpError, HttpError as HttpErrors, type HttpMethod, type HttpMethodOptions, type HttpRequestOptions, type HttpRequestView, type HttpResponse, type HttpStatusError, IO, type IO as IOType, type Task as IOTask, ISO8601Date, Identity, InstanceType, IntegerNumber, InterruptedError, KVTraversable, Kind, Layer, type Layer as LayerType, type LayerError, type LayerInput, type LayerOutput, Lazy, type Lazy as LazyType, LazyList, Left, LeftError, LeftErrorType, LeftOf, List, ListKind, Map, Match, type Matchable, MatchableUtils, type Monad, NAME, type NetworkError, NonEmptyString, NonNegativeNumber, None, NoneError, Obj, Ok, Option, OptionConstructor, OptionKind, ParseError, type ParseMode, PatternString, Pipe, PositiveInteger, PositiveNumber, type Promisable, type RIO, Ref, type Ref as RefType, type ResponseDecodeError, Right, RightOf, Serializable, SerializableEnvelope, Serialization_d_exports as Serialization, SerializationMethods, SerializationResult, SerializedError, Set, Some, Stack, Sync, Tag, type Tag as TagType, type TagService, TaggedThrowable, Task$1 as Task, TaskErrorInfo, TaskFailure, TaskMetadata, TaskOutcome, TaskParams, TaskResult, TaskSuccess, TestClock, type TestClock as TestClockType, TestClockTag, TestContext, type TestContext as TestContextType, TestEither, Throwable, ThrowableType, TimeoutError, Traversable, Try, TryKind, Tuple, Type, TypeCheckLeft, TypeCheckRight, TypeNames, Typeable, TypeableParams, TypedError, TypedErrorContext, type UIO, UUID, UniversalContainer, UntypedMatch, type Unwrap, UrlString, ValidatedBrand, type ValidatedBrand as ValidatedBrandType, type ValidatedBrandCompanion, Validation, ValidationRule, Validator, Valuable, ValuableParams, type Widen, createBrander, createCancellationTokenSource, createCustomSerializer, createErrorSerializer, createSerializationCompanion, createSerializer, createTaggedSerializer, deserializeError, envelope, formatError, formatStackTrace, fromBinary, fromJSON, fromYAML, hasBrand, isCompanion, isDoCapable, isExtractable, isLeft, isRight, isTaggedThrowable, isTypeable, reduceRightWiden, reduceWiden, safeStringify, serializeError, taggedEnvelope, tryCatch, tryCatchAsync, unwrap, unwrapBrand };
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Brand as e,BrandedBoolean as t,BrandedNumber as n,BrandedString as r,createBrander as i,hasBrand as a,unwrap as o}from"./branded/index.js";import{$ as s,A as c,At as l,B as u,
|
|
1
|
+
import{Brand as e,BrandedBoolean as t,BrandedNumber as n,BrandedString as r,createBrander as i,hasBrand as a,unwrap as o}from"./branded/index.js";import{$ as s,A as c,At as l,B as u,C as d,Ct as f,D as p,Dt as m,E as h,Et as g,F as _,Ft as v,G as y,H as b,I as x,It as S,J as C,K as w,L as T,Lt as E,M as D,Mt as O,N as k,Nt as A,O as j,Ot as M,P as N,Pt as P,Q as F,R as I,S as L,St as R,T as z,Tt as B,U as V,V as H,W as U,X as W,Y as G,Z as K,_ as q,_t as J,a as Y,at as X,b as Z,bt as Q,c as $,ct as ee,d as te,dt as ne,et as re,f as ie,ft as ae,g as oe,gt as se,h as ce,ht as le,i as ue,it as de,j as fe,jt as pe,k as me,kt as he,l as ge,lt as _e,m as ve,mt as ye,n as be,nt as xe,o as Se,ot as Ce,p as we,pt as Te,q as Ee,r as De,rt as Oe,s as ke,st as Ae,t as je,tt as Me,u as Ne,ut as Pe,v as Fe,vt as Ie,w as Le,wt as Re,x as ze,xt as Be,y as Ve,yt as He,z as Ue}from"./src-CONOwKkM.js";import{a as We,c as Ge,d as Ke,i as qe,l as Je,n as Ye,o as Xe,p as Ze,r as Qe,s as $e,t as et,u as tt}from"./Tuple-knEoDiKZ.js";export{c as $,W as Base,re as BoundedNumber,Me as BoundedString,e as Brand,t as BrandedBoolean,n as BrandedNumber,r as BrandedString,Ze as Companion,F as Cond,L as Context,Ue as Decoder,u as DecoderError,fe as Do,D as DoAsync,b as ESMap,Te as Either,xe as EmailAddress,k as EmptyListError,V as Err,ze as Exit,Ye as FUNCTYPE_MARKER,N as FailureError,ge as FoldableUtils,$ as HKT,Ne as Http,ie as HttpClient,te as HttpErrors,Fe as IO,Oe as ISO8601Date,ke as Identity,de as IntegerNumber,Ve as InterruptedError,q as Layer,Se as Lazy,g as LazyList,ye as Left,_ as LeftError,R as List,H as Map,K as Match,Y as MatchableUtils,C as NAME,X as NonEmptyString,Ce as NonNegativeNumber,pe as None,x as NoneError,ue as Obj,U as Ok,O as Option,A as OptionConstructor,E as ParseError,Ae as PatternString,ee as PositiveInteger,_e as PositiveNumber,m as Ref,le as Right,be as Serialization,M as Set,P as Some,De as Stack,oe as Tag,y as Task,we as TestClock,ve as TestClockTag,ce as TestContext,G as Throwable,Z as TimeoutError,B as Try,et as Tuple,se as TypeCheckLeft,J as TypeCheckRight,f as Typeable,z as TypedError,Pe as UUID,ne as UrlString,ae as ValidatedBrand,Le as Validation,je as Valuable,i as createBrander,w as createCancellationTokenSource,Qe as createCustomSerializer,h as createErrorSerializer,qe as createSerializationCompanion,We as createSerializer,Xe as createTaggedSerializer,v as deserializeError,$e as envelope,p as formatError,j as formatStackTrace,Ge as fromBinary,Je as fromJSON,tt as fromYAML,a as hasBrand,s as isCompanion,T as isDoCapable,d as isExtractable,Ie as isLeft,He as isRight,Ee as isTaggedThrowable,Re as isTypeable,he as reduceRightWiden,l as reduceWiden,me as safeStringify,S as serializeError,Ke as taggedEnvelope,Q as tryCatch,Be as tryCatchAsync,I as unwrap,o as unwrapBrand};
|
package/dist/list/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { j as List } from "../index-
|
|
1
|
+
import { j as List } from "../index-DAKubqXO.js";
|
|
2
2
|
export { List };
|
package/dist/list/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{St as e}from"../src-CONOwKkM.js";export{e as List};
|
package/dist/map/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { q as Map } from "../index-DAKubqXO.js";
|
|
2
2
|
export { Map };
|
package/dist/map/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{V as e}from"../src-CONOwKkM.js";export{e as Map};
|
package/dist/option/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { F as Some, M as None, N as Option, P as OptionConstructor } from "../index-
|
|
1
|
+
import { F as Some, M as None, N as Option, P as OptionConstructor } from "../index-DAKubqXO.js";
|
|
2
2
|
export { None, Option, OptionConstructor, Some };
|
package/dist/option/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Mt as e,Nt as t,Pt as n,jt as r}from"../src-CONOwKkM.js";export{r as None,e as Option,t as OptionConstructor,n as Some};
|
package/dist/set/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { z as Set } from "../index-
|
|
1
|
+
import { z as Set } from "../index-DAKubqXO.js";
|
|
2
2
|
export { Set };
|
package/dist/set/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Ot as e}from"../src-CONOwKkM.js";export{e as Set};
|