@nicolastoulemont/std 0.5.1 → 0.7.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/README.md +546 -0
- package/dist/adt/index.d.mts +2 -2
- package/dist/adt/index.mjs +1 -1
- package/dist/adt-DajUZvJe.mjs +2 -0
- package/dist/adt-DajUZvJe.mjs.map +1 -0
- package/dist/brand/index.d.mts +2 -2
- package/dist/brand/index.mjs +1 -1
- package/dist/brand-Bia3Vj6l.mjs +2 -0
- package/dist/brand-Bia3Vj6l.mjs.map +1 -0
- package/dist/chunk-C934ptG5.mjs +1 -0
- package/dist/context/index.d.mts +2 -0
- package/dist/context/index.mjs +1 -0
- package/dist/context-CCHj1nab.mjs +2 -0
- package/dist/context-CCHj1nab.mjs.map +1 -0
- package/dist/context-r8ESJiFn.d.mts +176 -0
- package/dist/context-r8ESJiFn.d.mts.map +1 -0
- package/dist/data/index.d.mts +2 -2
- package/dist/data/index.mjs +1 -1
- package/dist/data-CJxw6al9.mjs +2 -0
- package/dist/data-CJxw6al9.mjs.map +1 -0
- package/dist/data.tagged-error.types-CLlJJ3n5.d.mts +50 -0
- package/dist/data.tagged-error.types-CLlJJ3n5.d.mts.map +1 -0
- package/dist/{discriminator.types-DkThfvNE.d.mts → discriminator.types-CTURejXz.d.mts} +1 -1
- package/dist/discriminator.types-CTURejXz.d.mts.map +1 -0
- package/dist/dual-CZhzZslG.mjs +2 -0
- package/dist/dual-CZhzZslG.mjs.map +1 -0
- package/dist/either/index.d.mts +2 -2
- package/dist/either/index.mjs +1 -1
- package/dist/either-6BwadiFj.mjs +2 -0
- package/dist/either-6BwadiFj.mjs.map +1 -0
- package/dist/equality-CoyUHWh9.mjs +2 -0
- package/dist/equality-CoyUHWh9.mjs.map +1 -0
- package/dist/flow-D8_tllWl.mjs +2 -0
- package/dist/flow-D8_tllWl.mjs.map +1 -0
- package/dist/functions/index.d.mts +2 -0
- package/dist/functions/index.mjs +1 -0
- package/dist/functions-BkevX2Dw.mjs +2 -0
- package/dist/functions-BkevX2Dw.mjs.map +1 -0
- package/dist/fx/index.d.mts +2 -3
- package/dist/fx/index.mjs +1 -1
- package/dist/fx-BzxLbf1Q.mjs +2 -0
- package/dist/fx-BzxLbf1Q.mjs.map +1 -0
- package/dist/fx.runtime-BcC6yMSy.mjs +2 -0
- package/dist/fx.runtime-BcC6yMSy.mjs.map +1 -0
- package/dist/{fx.types-CXTwEa1G.mjs → fx.types-Bg-Mmdm5.mjs} +1 -1
- package/dist/fx.types-Bg-Mmdm5.mjs.map +1 -0
- package/dist/{fx.types-DO-8yG4c.d.mts → fx.types-DeEWEltG.d.mts} +3 -8
- package/dist/{fx.types-DO-8yG4c.d.mts.map → fx.types-DeEWEltG.d.mts.map} +1 -1
- package/dist/index-7Lv982Om.d.mts +217 -0
- package/dist/index-7Lv982Om.d.mts.map +1 -0
- package/dist/index-B_iY5tq0.d.mts +241 -0
- package/dist/index-B_iY5tq0.d.mts.map +1 -0
- package/dist/index-B_wWGszy.d.mts +129 -0
- package/dist/index-B_wWGszy.d.mts.map +1 -0
- package/dist/index-BiiE8NS7.d.mts +108 -0
- package/dist/index-BiiE8NS7.d.mts.map +1 -0
- package/dist/index-By6dNRc4.d.mts +277 -0
- package/dist/index-By6dNRc4.d.mts.map +1 -0
- package/dist/index-CCo85AdC.d.mts +121 -0
- package/dist/index-CCo85AdC.d.mts.map +1 -0
- package/dist/index-CUZn-ohG.d.mts +490 -0
- package/dist/index-CUZn-ohG.d.mts.map +1 -0
- package/dist/index-CugDqdx6.d.mts +464 -0
- package/dist/index-CugDqdx6.d.mts.map +1 -0
- package/dist/index-DEAWPlcI.d.mts +405 -0
- package/dist/index-DEAWPlcI.d.mts.map +1 -0
- package/dist/index-DKS1g1oC.d.mts +449 -0
- package/dist/index-DKS1g1oC.d.mts.map +1 -0
- package/dist/index-DSsDFLGw.d.mts +777 -0
- package/dist/index-DSsDFLGw.d.mts.map +1 -0
- package/dist/{index-DjjJIDaA.d.mts → index-DXbYlSnB.d.mts} +66 -103
- package/dist/index-DXbYlSnB.d.mts.map +1 -0
- package/dist/{index-DtAPrec7.d.mts → index-DaTvFhZ8.d.mts} +167 -52
- package/dist/index-DaTvFhZ8.d.mts.map +1 -0
- package/dist/index-Dm2dFysv.d.mts +415 -0
- package/dist/index-Dm2dFysv.d.mts.map +1 -0
- package/dist/index.d.mts +23 -16
- package/dist/index.mjs +1 -1
- package/dist/layer/index.d.mts +2 -0
- package/dist/layer/index.mjs +1 -0
- package/dist/layer-BttmtDrs.mjs +2 -0
- package/dist/layer-BttmtDrs.mjs.map +1 -0
- package/dist/layer.types-DgpCIsk_.d.mts +100 -0
- package/dist/layer.types-DgpCIsk_.d.mts.map +1 -0
- package/dist/multithread/index.d.mts +2 -0
- package/dist/multithread/index.mjs +1 -0
- package/dist/multithread-xUUh4eLn.mjs +19 -0
- package/dist/multithread-xUUh4eLn.mjs.map +1 -0
- package/dist/option/index.d.mts +2 -3
- package/dist/option/index.mjs +1 -1
- package/dist/option-Qt1H-u7c.mjs +2 -0
- package/dist/option-Qt1H-u7c.mjs.map +1 -0
- package/dist/option.types-DRUm2QiI.mjs +2 -0
- package/dist/option.types-DRUm2QiI.mjs.map +1 -0
- package/dist/{option.types-Cluybn30.d.mts → option.types-DlAb6Sr0.d.mts} +6 -11
- package/dist/option.types-DlAb6Sr0.d.mts.map +1 -0
- package/dist/order/index.d.mts +2 -0
- package/dist/order/index.mjs +1 -0
- package/dist/order-D5c4QChk.mjs +2 -0
- package/dist/order-D5c4QChk.mjs.map +1 -0
- package/dist/pipeable-COGyGMUV.mjs +2 -0
- package/dist/pipeable-COGyGMUV.mjs.map +1 -0
- package/dist/{pipeable-KHu4D8ol.d.mts → pipeable-rfqacPxZ.d.mts} +2 -9
- package/dist/{pipeable-KHu4D8ol.d.mts.map → pipeable-rfqacPxZ.d.mts.map} +1 -1
- package/dist/predicate/index.d.mts +2 -2
- package/dist/predicate/index.mjs +1 -1
- package/dist/predicate-DUhhQqWY.mjs +2 -0
- package/dist/predicate-DUhhQqWY.mjs.map +1 -0
- package/dist/provide/index.d.mts +2 -0
- package/dist/provide/index.mjs +1 -0
- package/dist/provide-B_SqJpCd.mjs +2 -0
- package/dist/provide-B_SqJpCd.mjs.map +1 -0
- package/dist/queue/index.d.mts +2 -0
- package/dist/queue/index.mjs +1 -0
- package/dist/queue-CG5izEBS.mjs +2 -0
- package/dist/queue-CG5izEBS.mjs.map +1 -0
- package/dist/queue.types-CD2LOu37.d.mts +36 -0
- package/dist/queue.types-CD2LOu37.d.mts.map +1 -0
- package/dist/result/index.d.mts +2 -3
- package/dist/result/index.mjs +1 -1
- package/dist/result-B5WbPg8C.mjs +1 -0
- package/dist/result-BEzV0DYC.mjs +2 -0
- package/dist/result-BEzV0DYC.mjs.map +1 -0
- package/dist/{result.types-fIbuBwVQ.d.mts → result.types-_xDAei3-.d.mts} +31 -109
- package/dist/result.types-_xDAei3-.d.mts.map +1 -0
- package/dist/schedule/index.d.mts +2 -0
- package/dist/schedule/index.mjs +1 -0
- package/dist/schedule-C6tjcJ1O.mjs +2 -0
- package/dist/schedule-C6tjcJ1O.mjs.map +1 -0
- package/dist/schedule-DlX2Dg69.d.mts +144 -0
- package/dist/schedule-DlX2Dg69.d.mts.map +1 -0
- package/dist/scope/index.d.mts +2 -0
- package/dist/scope/index.mjs +1 -0
- package/dist/scope-CZdp4wKX.d.mts +79 -0
- package/dist/scope-CZdp4wKX.d.mts.map +1 -0
- package/dist/scope-qwL1VUh2.mjs +2 -0
- package/dist/scope-qwL1VUh2.mjs.map +1 -0
- package/dist/service/index.d.mts +2 -0
- package/dist/service/index.mjs +1 -0
- package/dist/service-3PYQTUdH.mjs +2 -0
- package/dist/service-3PYQTUdH.mjs.map +1 -0
- package/dist/service-DrXU7KJG.d.mts +69 -0
- package/dist/service-DrXU7KJG.d.mts.map +1 -0
- package/dist/service-resolution-C19smeaO.mjs +2 -0
- package/dist/service-resolution-C19smeaO.mjs.map +1 -0
- package/package.json +52 -13
- package/dist/adt-DZmVJG4P.mjs +0 -2
- package/dist/adt-DZmVJG4P.mjs.map +0 -1
- package/dist/apply-fn.types-CMgY6WQe.d.mts +0 -8
- package/dist/apply-fn.types-CMgY6WQe.d.mts.map +0 -1
- package/dist/brand-BUqMmkzC.mjs +0 -2
- package/dist/brand-BUqMmkzC.mjs.map +0 -1
- package/dist/data-DzqKBCQg.mjs +0 -2
- package/dist/data-DzqKBCQg.mjs.map +0 -1
- package/dist/discriminator.types-DkThfvNE.d.mts.map +0 -1
- package/dist/either-BDY9T5oz.mjs +0 -2
- package/dist/either-BDY9T5oz.mjs.map +0 -1
- package/dist/equality-D2EJvZm4.mjs +0 -2
- package/dist/equality-D2EJvZm4.mjs.map +0 -1
- package/dist/err/index.d.mts +0 -2
- package/dist/err/index.mjs +0 -1
- package/dist/err-CYs4b1RV.mjs +0 -2
- package/dist/err-CYs4b1RV.mjs.map +0 -1
- package/dist/flow/index.d.mts +0 -2
- package/dist/flow/index.mjs +0 -1
- package/dist/flow-CxKQ5yac.mjs +0 -2
- package/dist/flow-CxKQ5yac.mjs.map +0 -1
- package/dist/fx-C4UuWCqP.mjs +0 -2
- package/dist/fx-C4UuWCqP.mjs.map +0 -1
- package/dist/fx.types-CXTwEa1G.mjs.map +0 -1
- package/dist/index-78LWwTds.d.mts +0 -288
- package/dist/index-78LWwTds.d.mts.map +0 -1
- package/dist/index-BQ5wVDSP.d.mts +0 -441
- package/dist/index-BQ5wVDSP.d.mts.map +0 -1
- package/dist/index-BahMvQpA.d.mts +0 -80
- package/dist/index-BahMvQpA.d.mts.map +0 -1
- package/dist/index-Bs5TTFlK.d.mts +0 -882
- package/dist/index-Bs5TTFlK.d.mts.map +0 -1
- package/dist/index-BuLJRX1e.d.mts +0 -476
- package/dist/index-BuLJRX1e.d.mts.map +0 -1
- package/dist/index-CDio8mJY.d.mts +0 -225
- package/dist/index-CDio8mJY.d.mts.map +0 -1
- package/dist/index-DLlx9jiG.d.mts +0 -389
- package/dist/index-DLlx9jiG.d.mts.map +0 -1
- package/dist/index-DjjJIDaA.d.mts.map +0 -1
- package/dist/index-DtAPrec7.d.mts.map +0 -1
- package/dist/index-IdejL485.d.mts +0 -79
- package/dist/index-IdejL485.d.mts.map +0 -1
- package/dist/index-UYodvXes.d.mts +0 -846
- package/dist/index-UYodvXes.d.mts.map +0 -1
- package/dist/option-Qiv7Ls7L.mjs +0 -2
- package/dist/option-Qiv7Ls7L.mjs.map +0 -1
- package/dist/option.types-By5UOfC2.mjs +0 -2
- package/dist/option.types-By5UOfC2.mjs.map +0 -1
- package/dist/option.types-Cluybn30.d.mts.map +0 -1
- package/dist/pipe/index.d.mts +0 -2
- package/dist/pipe/index.mjs +0 -1
- package/dist/pipe-BROILDeC.mjs +0 -2
- package/dist/pipe-BROILDeC.mjs.map +0 -1
- package/dist/pipeable-rQvolRqh.mjs +0 -2
- package/dist/pipeable-rQvolRqh.mjs.map +0 -1
- package/dist/predicate-DvXnfmeJ.mjs +0 -2
- package/dist/predicate-DvXnfmeJ.mjs.map +0 -1
- package/dist/result-B68pxC7l.mjs +0 -2
- package/dist/result-B68pxC7l.mjs.map +0 -1
- package/dist/result.types-fIbuBwVQ.d.mts.map +0 -1
- /package/dist/{result-uRORQlAQ.mjs → option-CBCwzF0L.mjs} +0 -0
|
@@ -0,0 +1,449 @@
|
|
|
1
|
+
import { h as Prettify, t as Result } from "./result.types-_xDAei3-.mjs";
|
|
2
|
+
import { t as Discriminator } from "./discriminator.types-CTURejXz.mjs";
|
|
3
|
+
import { StandardSchemaV1 } from "@standard-schema/spec";
|
|
4
|
+
|
|
5
|
+
//#region src/adt/adt.match.d.ts
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Handler functions for each variant in a discriminated union.
|
|
9
|
+
* Each key maps to a function that receives the variant value and returns TResult.
|
|
10
|
+
*
|
|
11
|
+
* @template T - The discriminated union type (must have readonly _tag)
|
|
12
|
+
* @template TResult - The return type of all handlers
|
|
13
|
+
*/
|
|
14
|
+
type AdtMatchHandlers<T extends {
|
|
15
|
+
readonly _tag: string;
|
|
16
|
+
}, TResult> = { [K in T["_tag"]]: (value: Extract<T, {
|
|
17
|
+
readonly _tag: K;
|
|
18
|
+
}>) => TResult };
|
|
19
|
+
/**
|
|
20
|
+
* Exhaustive pattern matching for discriminated unions.
|
|
21
|
+
*
|
|
22
|
+
* TypeScript will error if any variant is missing from handlers,
|
|
23
|
+
* ensuring exhaustive handling of all cases.
|
|
24
|
+
*
|
|
25
|
+
* @template T - The discriminated union type (must have readonly _tag)
|
|
26
|
+
* @template TResult - The return type of all handlers
|
|
27
|
+
* @template Handlers - The handler object type (inferred)
|
|
28
|
+
* @param value - A discriminated union value with _tag
|
|
29
|
+
* @param handlers - An object with a handler function for each variant
|
|
30
|
+
* @returns The result of calling the matching handler
|
|
31
|
+
*
|
|
32
|
+
* @see {@link union} for creating discriminated unions
|
|
33
|
+
* @see {@link variant} for creating individual variant types
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* ```ts
|
|
37
|
+
* const Shape = union('Shape', { Circle, Square })
|
|
38
|
+
* type Shape = AdtInfer<typeof Shape>
|
|
39
|
+
*
|
|
40
|
+
* function describeShape(shape: Shape): string {
|
|
41
|
+
* return match(shape, {
|
|
42
|
+
* Circle: (c) => `Circle with radius ${c.radius}`,
|
|
43
|
+
* Square: (s) => `Square with size ${s.size}`,
|
|
44
|
+
* })
|
|
45
|
+
* }
|
|
46
|
+
* ```
|
|
47
|
+
*/
|
|
48
|
+
declare function match$1<T extends {
|
|
49
|
+
readonly _tag: string;
|
|
50
|
+
}, TResult, Handlers extends AdtMatchHandlers<T, TResult> = AdtMatchHandlers<T, TResult>>(value: T, handlers: Handlers): TResult;
|
|
51
|
+
//#endregion
|
|
52
|
+
//#region src/adt/adt.types.d.ts
|
|
53
|
+
/**
|
|
54
|
+
* Validation error containing issues from schema validation.
|
|
55
|
+
* Mirrors the Standard Schema issue format.
|
|
56
|
+
*/
|
|
57
|
+
type AdtValidationError = {
|
|
58
|
+
readonly issues: ReadonlyArray<{
|
|
59
|
+
readonly message: string;
|
|
60
|
+
readonly path?: ReadonlyArray<PropertyKey> | undefined;
|
|
61
|
+
}>;
|
|
62
|
+
};
|
|
63
|
+
/**
|
|
64
|
+
* Constraint for custom codec definitions.
|
|
65
|
+
* Ensures codecs have properly typed `to` and `from` methods.
|
|
66
|
+
* Used to constrain the Codecs generic parameter throughout the codebase.
|
|
67
|
+
*/
|
|
68
|
+
type AdtCodecConstraint<Tag$1 extends string, S$1 extends StandardSchemaV1> = Record<string, {
|
|
69
|
+
to: (value: AdtInferOutput<S$1> & Discriminator<Tag$1>) => any;
|
|
70
|
+
from: (input: any) => any;
|
|
71
|
+
}>;
|
|
72
|
+
/**
|
|
73
|
+
* Error type for codec operations.
|
|
74
|
+
* Used when encoding fails or when decoded data fails validation.
|
|
75
|
+
*/
|
|
76
|
+
type AdtCodecError = {
|
|
77
|
+
readonly kind: "EncodingError" | "DecodingError" | "ValidationError";
|
|
78
|
+
readonly message: string;
|
|
79
|
+
readonly cause?: unknown;
|
|
80
|
+
readonly validationIssues?: AdtValidationError["issues"];
|
|
81
|
+
};
|
|
82
|
+
/**
|
|
83
|
+
* Infer the input type from a Standard Schema.
|
|
84
|
+
* This is what the user provides to create().
|
|
85
|
+
*/
|
|
86
|
+
type AdtInferInput<S$1 extends StandardSchemaV1> = NonNullable<S$1["~standard"]["types"]>["input"];
|
|
87
|
+
/**
|
|
88
|
+
* Infer the output type from a Standard Schema.
|
|
89
|
+
* This is what validation returns (after transforms/defaults).
|
|
90
|
+
*/
|
|
91
|
+
type AdtInferOutput<S$1 extends StandardSchemaV1> = NonNullable<S$1["~standard"]["types"]>["output"];
|
|
92
|
+
/**
|
|
93
|
+
* Extract the return type from a codec's `to` method.
|
|
94
|
+
* This is what the encoding function returns (e.g., string, Uint8Array).
|
|
95
|
+
*/
|
|
96
|
+
type ExtractToReturn<C> = C extends {
|
|
97
|
+
to: (value: any) => infer R;
|
|
98
|
+
} ? R : never;
|
|
99
|
+
/**
|
|
100
|
+
* Extract the input type from a codec's `from` method.
|
|
101
|
+
* This is what the decoding function accepts (e.g., string, Uint8Array).
|
|
102
|
+
*/
|
|
103
|
+
type ExtractFromInput<C> = C extends {
|
|
104
|
+
from: (input: infer I) => any;
|
|
105
|
+
} ? I : never;
|
|
106
|
+
/**
|
|
107
|
+
* Build the "to" object containing encoding methods.
|
|
108
|
+
* Always includes 'json' plus any custom codec names.
|
|
109
|
+
* Uses type extraction to infer return types from codec definitions.
|
|
110
|
+
* All methods return Result<T, AdtCodecError> for consistent error handling.
|
|
111
|
+
*/
|
|
112
|
+
type ToMethods<S$1 extends StandardSchemaV1, Codecs> = {
|
|
113
|
+
json: (value: AdtInferInput<S$1>) => Result<string, AdtCodecError>;
|
|
114
|
+
} & (Codecs extends Record<string, any> ? { [K in keyof Codecs]: (value: AdtInferInput<S$1>) => Result<ExtractToReturn<Codecs[K]>, AdtCodecError> } : object);
|
|
115
|
+
/**
|
|
116
|
+
* Build the "from" object containing decoding methods.
|
|
117
|
+
* Always includes 'json' plus any custom codec names.
|
|
118
|
+
* All methods return Result<T, AdtCodecError> for consistent error handling.
|
|
119
|
+
* Uses type extraction to infer input types from codec definitions.
|
|
120
|
+
*/
|
|
121
|
+
type FromMethods<Tag$1 extends string, S$1 extends StandardSchemaV1, Codecs> = {
|
|
122
|
+
json: (input: string) => Result<AdtInferOutput<S$1> & Discriminator<Tag$1>, AdtCodecError>;
|
|
123
|
+
} & (Codecs extends Record<string, any> ? { [K in keyof Codecs]: (input: ExtractFromInput<Codecs[K]>) => Result<AdtInferOutput<S$1> & Discriminator<Tag$1>, AdtCodecError> } : object);
|
|
124
|
+
/**
|
|
125
|
+
* A tagged variant created by the variant() function.
|
|
126
|
+
* Can be used standalone or composed into an AdtUnion via union().
|
|
127
|
+
* Callable as a function to create instances.
|
|
128
|
+
*/
|
|
129
|
+
type AdtVariant<Tag$1 extends string = string, S$1 extends StandardSchemaV1 = StandardSchemaV1, Codecs extends AdtCodecConstraint<Tag$1, S$1> | undefined = undefined> = {
|
|
130
|
+
/** Marker to identify this as a AdtVariant */
|
|
131
|
+
readonly _variant: true;
|
|
132
|
+
/** The _tag discriminator value */
|
|
133
|
+
readonly _tag: Tag$1;
|
|
134
|
+
/** The underlying Standard Schema */
|
|
135
|
+
readonly schema: S$1;
|
|
136
|
+
/** Codec definitions (if provided) */
|
|
137
|
+
readonly codecs?: Codecs;
|
|
138
|
+
/**
|
|
139
|
+
* Create an instance of this variant.
|
|
140
|
+
* @param input - The input data (schema defaults apply)
|
|
141
|
+
* @returns Result with tagged output or validation error
|
|
142
|
+
*/
|
|
143
|
+
(input: AdtInferInput<S$1>): Result<AdtInferOutput<S$1> & Discriminator<Tag$1>, AdtValidationError>;
|
|
144
|
+
/**
|
|
145
|
+
* Type guard to check if a value is this variant type.
|
|
146
|
+
* @param value - The value to check
|
|
147
|
+
*/
|
|
148
|
+
is(value: unknown): value is AdtInferOutput<S$1> & Discriminator<Tag$1>;
|
|
149
|
+
/**
|
|
150
|
+
* Encoding methods for serializing variant values.
|
|
151
|
+
* Always includes 'json' plus any custom codecs.
|
|
152
|
+
*/
|
|
153
|
+
readonly to: ToMethods<S$1, Codecs>;
|
|
154
|
+
/**
|
|
155
|
+
* Decoding methods for deserializing to variant values.
|
|
156
|
+
* Always includes 'json' plus any custom codecs.
|
|
157
|
+
* All methods validate through the schema before returning.
|
|
158
|
+
*/
|
|
159
|
+
readonly from: FromMethods<Tag$1, S$1, Codecs>;
|
|
160
|
+
/**
|
|
161
|
+
* Compare two instances of this variant for value equality.
|
|
162
|
+
* Performs deep comparison of all fields.
|
|
163
|
+
*/
|
|
164
|
+
equals(a: AdtInferOutput<S$1> & Discriminator<Tag$1>, b: AdtInferOutput<S$1> & Discriminator<Tag$1>): boolean;
|
|
165
|
+
/**
|
|
166
|
+
* Compute a hash code for a variant instance.
|
|
167
|
+
* Equal values always produce the same hash.
|
|
168
|
+
* Useful for Map/Set keys.
|
|
169
|
+
*/
|
|
170
|
+
hash(value: AdtInferOutput<S$1> & Discriminator<Tag$1>): number;
|
|
171
|
+
};
|
|
172
|
+
/**
|
|
173
|
+
* A variant definition can be either:
|
|
174
|
+
* - A raw Standard Schema (will be wrapped internally)
|
|
175
|
+
* - A pre-built AdtVariant from variant()
|
|
176
|
+
*/
|
|
177
|
+
type AdtVariantDef = StandardSchemaV1 | AdtVariant<string, any, any>;
|
|
178
|
+
/**
|
|
179
|
+
* Extract the schema from a AdtVariantDef (handles both raw schema and AdtVariant)
|
|
180
|
+
*/
|
|
181
|
+
type AdtExtractSchema<T extends AdtVariantDef> = T extends AdtVariant<string, infer S, any> ? S : T extends StandardSchemaV1 ? T : never;
|
|
182
|
+
/**
|
|
183
|
+
* Extract the codecs from a AdtVariantDef (if it's a AdtVariant with codecs)
|
|
184
|
+
*/
|
|
185
|
+
type ExtractCodecs<T extends AdtVariantDef> = T extends AdtVariant<string, any, infer Codecs> ? Codecs : undefined;
|
|
186
|
+
/**
|
|
187
|
+
* The AdtUnion returned by union().
|
|
188
|
+
* Contains all variant accessors plus a root type guard.
|
|
189
|
+
* Codecs from variants are preserved in AdtUnion variants.
|
|
190
|
+
*/
|
|
191
|
+
type AdtUnion<R$1 extends Record<string, AdtVariantDef>> = {
|
|
192
|
+
/** The name of this AdtUnion */
|
|
193
|
+
readonly _name: string;
|
|
194
|
+
/**
|
|
195
|
+
* Type guard to check if a value is any variant of this AdtUnion.
|
|
196
|
+
*/
|
|
197
|
+
is(value: unknown): value is InferADTUnion<R$1>;
|
|
198
|
+
/**
|
|
199
|
+
* Compare two AdtUnion values for equality.
|
|
200
|
+
* First checks _tag matches, then compares fields.
|
|
201
|
+
*/
|
|
202
|
+
equals(a: InferADTUnion<R$1>, b: InferADTUnion<R$1>): boolean;
|
|
203
|
+
/**
|
|
204
|
+
* Compute a hash code for any AdtUnion variant.
|
|
205
|
+
*/
|
|
206
|
+
hash(value: InferADTUnion<R$1>): number;
|
|
207
|
+
} & { [K in keyof R$1]: AdtVariant<K & string, AdtExtractSchema<R$1[K]>, ExtractCodecs<R$1[K]>> };
|
|
208
|
+
/**
|
|
209
|
+
* Infer the output type for a single variant within an AdtUnion.
|
|
210
|
+
*/
|
|
211
|
+
type InferRecordOutput<Tag$1 extends string, R$1 extends AdtVariantDef> = AdtInferOutput<AdtExtractSchema<R$1>> & {
|
|
212
|
+
readonly _tag: Tag$1;
|
|
213
|
+
};
|
|
214
|
+
/**
|
|
215
|
+
* Infer the union of all variant output types in an AdtUnion.
|
|
216
|
+
*/
|
|
217
|
+
type InferADTUnion<R$1 extends Record<string, AdtVariantDef>> = { [K in keyof R$1]: InferRecordOutput<K & string, R$1[K]> }[keyof R$1];
|
|
218
|
+
/**
|
|
219
|
+
* AdtInfer types from an AdtUnion or AdtVariant, following Zod's `z.infer` pattern.
|
|
220
|
+
*
|
|
221
|
+
* - For ADTs: Returns the union of all variant types
|
|
222
|
+
* - For AdtVariants: Returns the individual variant type
|
|
223
|
+
*
|
|
224
|
+
* @example
|
|
225
|
+
* ```ts
|
|
226
|
+
* // AdtInfer union type from AdtUnion
|
|
227
|
+
* const Shape = union('Shape', { Circle, Square })
|
|
228
|
+
* type Shape = AdtInfer<typeof Shape>
|
|
229
|
+
* // => { _tag: 'Circle', radius: number } | { _tag: 'Square', size: number }
|
|
230
|
+
*
|
|
231
|
+
* // Infer individual variant type
|
|
232
|
+
* type Circle = AdtInfer<typeof Shape.Circle>
|
|
233
|
+
* // => { _tag: 'Circle', radius: number }
|
|
234
|
+
* ```
|
|
235
|
+
*/
|
|
236
|
+
type AdtInfer$1<T> = T extends AdtUnion<infer R> ? Prettify<InferADTUnion<R>> : T extends AdtVariant<infer Tag, infer S> ? Prettify<AdtInferOutput<S> & Discriminator<Tag>> : never;
|
|
237
|
+
/**
|
|
238
|
+
* Extract the union of all variant names from an AdtUnion.
|
|
239
|
+
*
|
|
240
|
+
* @example
|
|
241
|
+
* ```ts
|
|
242
|
+
* const Shape = union('Shape', { Circle, Square })
|
|
243
|
+
* type Names = AdtVariantNames<typeof Shape> // "Circle" | "Square"
|
|
244
|
+
* ```
|
|
245
|
+
*/
|
|
246
|
+
type AdtVariantNames$1<T> = T extends AdtUnion<infer R> ? keyof R & string : never;
|
|
247
|
+
/**
|
|
248
|
+
* Extract the type of a specific variant from an AdtUnion.
|
|
249
|
+
*
|
|
250
|
+
* @example
|
|
251
|
+
* ```ts
|
|
252
|
+
* const Shape = union('Shape', { Circle, Square })
|
|
253
|
+
* type CircleType = AdtVariantOf<typeof Shape, "Circle">
|
|
254
|
+
* // => { _tag: "Circle", radius: number }
|
|
255
|
+
* ```
|
|
256
|
+
*/
|
|
257
|
+
type AdtVariantOf$1<T, K$1 extends string> = T extends AdtUnion<infer R> ? K$1 extends keyof R ? Prettify<AdtInferOutput<AdtExtractSchema<R[K$1]>> & Discriminator<K$1>> : never : never;
|
|
258
|
+
//#endregion
|
|
259
|
+
//#region src/adt/adt.union.d.ts
|
|
260
|
+
/**
|
|
261
|
+
* Compose records or schemas into a discriminated union (AdtUnion).
|
|
262
|
+
*
|
|
263
|
+
* Accepts either:
|
|
264
|
+
* - Pre-built AdtVariants from variant() (codecs are preserved)
|
|
265
|
+
* - Raw Standard Schema validators (will be wrapped internally)
|
|
266
|
+
*
|
|
267
|
+
* When using pre-built records, the object key overrides the original _tag.
|
|
268
|
+
*
|
|
269
|
+
* @template R - Record of variant names to AdtVariants or StandardSchema validators
|
|
270
|
+
* @param name - The name of this AdtUnion (for identification)
|
|
271
|
+
* @param records - An object mapping _tag names to AdtVariants or schemas
|
|
272
|
+
* @returns An AdtUnion object with accessors for each variant
|
|
273
|
+
*
|
|
274
|
+
* @see {@link variant} for creating individual variant types
|
|
275
|
+
* @see {@link match} for exhaustive pattern matching on AdtUnion values
|
|
276
|
+
*
|
|
277
|
+
* @example
|
|
278
|
+
* ```ts
|
|
279
|
+
* // From pre-built variants
|
|
280
|
+
* const Circle = variant('Circle', CircleSchema)
|
|
281
|
+
* const Square = variant('Square', SquareSchema)
|
|
282
|
+
* const Shape = union('Shape', { Circle, Square })
|
|
283
|
+
*
|
|
284
|
+
* // From raw schemas (JSON codec is automatically included)
|
|
285
|
+
* const Shape = union('Shape', {
|
|
286
|
+
* Circle: CircleSchema,
|
|
287
|
+
* Square: SquareSchema
|
|
288
|
+
* })
|
|
289
|
+
*
|
|
290
|
+
* // JSON codec works on all variants
|
|
291
|
+
* Shape.Circle.to.json({ radius: 10 })
|
|
292
|
+
* Shape.Circle.from.json(jsonString)
|
|
293
|
+
*
|
|
294
|
+
* // Mixed
|
|
295
|
+
* const Shape = union('Shape', {
|
|
296
|
+
* Circle, // Pre-built variant
|
|
297
|
+
* Square: SquareSchema // Raw schema
|
|
298
|
+
* })
|
|
299
|
+
*
|
|
300
|
+
* // Usage
|
|
301
|
+
* Shape.Circle({ radius: 10 })
|
|
302
|
+
* Shape.is(someValue) // type guard for any variant
|
|
303
|
+
* Shape.Circle.is(someValue) // type guard for Circle
|
|
304
|
+
* ```
|
|
305
|
+
*/
|
|
306
|
+
declare function union$1<R$1 extends Record<string, AdtVariantDef>>(name: string, records: R$1): AdtUnion<R$1>;
|
|
307
|
+
//#endregion
|
|
308
|
+
//#region src/adt/adt.variant.d.ts
|
|
309
|
+
/**
|
|
310
|
+
* Create a standalone tagged variant from a Standard Schema with optional codecs.
|
|
311
|
+
*
|
|
312
|
+
* Variants can be used independently or composed into an AdtUnion via union().
|
|
313
|
+
* All defaults should be defined at the schema level (e.g., Zod's .default()).
|
|
314
|
+
*
|
|
315
|
+
* @template Tag - The string literal type for the _tag discriminator
|
|
316
|
+
* @template S - The Standard Schema type for validation
|
|
317
|
+
* @template Codecs - Optional codec definitions for custom serialization formats
|
|
318
|
+
* @param _tag - The _tag discriminator value
|
|
319
|
+
* @param schema - A Standard Schema compliant validator
|
|
320
|
+
* @param codecs - Optional codec definitions for custom serialization formats
|
|
321
|
+
* @returns A callable AdtVariant with is(), to, and from methods
|
|
322
|
+
*
|
|
323
|
+
* @see {@link union} for composing variants into discriminated unions
|
|
324
|
+
* @see {@link tagged} for unvalidated tagged value constructors
|
|
325
|
+
*
|
|
326
|
+
* @example
|
|
327
|
+
* ```ts
|
|
328
|
+
* const CircleSchema = z.object({
|
|
329
|
+
* radius: z.number().positive(),
|
|
330
|
+
* color: z.string().default('blue')
|
|
331
|
+
* })
|
|
332
|
+
*
|
|
333
|
+
* // Basic variant with JSON codec (always included)
|
|
334
|
+
* const Circle = variant('Circle', CircleSchema)
|
|
335
|
+
*
|
|
336
|
+
* const result = Circle({ radius: 10 })
|
|
337
|
+
* // { _tag: "Ok", value: { _tag: "Circle", radius: 10, color: "blue" } }
|
|
338
|
+
*
|
|
339
|
+
* Circle.is(someValue) // type guard
|
|
340
|
+
*
|
|
341
|
+
* const json = Circle.to.json({ radius: 10 }) // JSON string
|
|
342
|
+
* const result2 = Circle.from.json(json) // Result<Circle, AdtCodecError>
|
|
343
|
+
*
|
|
344
|
+
* // Variant with custom codec
|
|
345
|
+
* const Circle2 = variant('Circle', CircleSchema, {
|
|
346
|
+
* graphic: {
|
|
347
|
+
* to: (circle) => `(${circle.radius})`,
|
|
348
|
+
* from: (input: string) => {
|
|
349
|
+
* const match = input.match(/^\((\d+)\)$/)
|
|
350
|
+
* return match ? { radius: parseInt(match[1]!) } : null
|
|
351
|
+
* }
|
|
352
|
+
* }
|
|
353
|
+
* })
|
|
354
|
+
*
|
|
355
|
+
* const graphic = Circle2.to.graphic({ radius: 10 }) // "(10)"
|
|
356
|
+
* const result3 = Circle2.from.graphic("(10)") // Result<Circle, AdtCodecError>
|
|
357
|
+
* ```
|
|
358
|
+
*/
|
|
359
|
+
declare function variant$1<Tag$1 extends string, S$1 extends StandardSchemaV1, Codecs extends AdtCodecConstraint<Tag$1, S$1>>(_tag: Tag$1, schema: S$1, codecs: Codecs): AdtVariant<Tag$1, S$1, Codecs>;
|
|
360
|
+
declare function variant$1<Tag$1 extends string, S$1 extends StandardSchemaV1>(_tag: Tag$1, schema: S$1): AdtVariant<Tag$1, S$1>;
|
|
361
|
+
declare namespace adt_d_exports {
|
|
362
|
+
export { AdtInfer, AdtVariantNames, AdtVariantOf, match, union, variant };
|
|
363
|
+
}
|
|
364
|
+
/**
|
|
365
|
+
* Re-exported ADT inferred union helper.
|
|
366
|
+
*
|
|
367
|
+
* @example
|
|
368
|
+
* ```ts
|
|
369
|
+
* import { Adt } from "@nicolastoulemont/std"
|
|
370
|
+
*
|
|
371
|
+
* type Example = typeof Adt
|
|
372
|
+
* ```
|
|
373
|
+
*
|
|
374
|
+
* @category Type-level
|
|
375
|
+
*/
|
|
376
|
+
type AdtInfer<T> = AdtInfer$1<T>;
|
|
377
|
+
/**
|
|
378
|
+
* Re-exported union variant name helper.
|
|
379
|
+
*
|
|
380
|
+
* @example
|
|
381
|
+
* ```ts
|
|
382
|
+
* import { Adt } from "@nicolastoulemont/std"
|
|
383
|
+
*
|
|
384
|
+
* type Example = typeof Adt
|
|
385
|
+
* ```
|
|
386
|
+
*
|
|
387
|
+
* @category Type-level
|
|
388
|
+
*/
|
|
389
|
+
type AdtVariantNames<T> = AdtVariantNames$1<T>;
|
|
390
|
+
/**
|
|
391
|
+
* Re-exported helper to extract a specific variant from an ADT.
|
|
392
|
+
*
|
|
393
|
+
* @example
|
|
394
|
+
* ```ts
|
|
395
|
+
* import { Adt } from "@nicolastoulemont/std"
|
|
396
|
+
*
|
|
397
|
+
* type Example = typeof Adt
|
|
398
|
+
* ```
|
|
399
|
+
*
|
|
400
|
+
* @category Type-level
|
|
401
|
+
*/
|
|
402
|
+
type AdtVariantOf<T, K$1 extends string> = AdtVariantOf$1<T, K$1>;
|
|
403
|
+
/**
|
|
404
|
+
* Build an ADT union from named variants.
|
|
405
|
+
*
|
|
406
|
+
* @example
|
|
407
|
+
* ```ts
|
|
408
|
+
* import { Adt } from "@nicolastoulemont/std"
|
|
409
|
+
*
|
|
410
|
+
* const Shape = Adt.union("Shape", {} as never)
|
|
411
|
+
* // => union helper with tagged constructors
|
|
412
|
+
* ```
|
|
413
|
+
*
|
|
414
|
+
* @category Constructors
|
|
415
|
+
*/
|
|
416
|
+
declare const union: typeof union$1;
|
|
417
|
+
/**
|
|
418
|
+
* Define one ADT variant with schema-backed validation.
|
|
419
|
+
*
|
|
420
|
+
* @example
|
|
421
|
+
* ```ts
|
|
422
|
+
* import { Adt } from "@nicolastoulemont/std"
|
|
423
|
+
*
|
|
424
|
+
* const Circle = Adt.variant("Circle", {} as never)
|
|
425
|
+
* // => callable variant constructor
|
|
426
|
+
* ```
|
|
427
|
+
*
|
|
428
|
+
* @category Constructors
|
|
429
|
+
*/
|
|
430
|
+
declare const variant: typeof variant$1;
|
|
431
|
+
/**
|
|
432
|
+
* Match over ADT variants by discriminator tag.
|
|
433
|
+
*
|
|
434
|
+
* @example
|
|
435
|
+
* ```ts
|
|
436
|
+
* import { Adt } from "@nicolastoulemont/std"
|
|
437
|
+
*
|
|
438
|
+
* const label = Adt.match({ _tag: "Circle", radius: 2 } as const, {
|
|
439
|
+
* Circle: (circle) => `r=${circle.radius}` ,
|
|
440
|
+
* })
|
|
441
|
+
* // => "r=2"
|
|
442
|
+
* ```
|
|
443
|
+
*
|
|
444
|
+
* @category Pattern Matching
|
|
445
|
+
*/
|
|
446
|
+
declare const match: typeof match$1;
|
|
447
|
+
//#endregion
|
|
448
|
+
export { adt_d_exports as t };
|
|
449
|
+
//# sourceMappingURL=index-DKS1g1oC.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-DKS1g1oC.d.mts","names":[],"sources":["../src/adt/adt.match.ts","../src/adt/adt.types.ts","../src/adt/adt.union.ts","../src/adt/adt.variant.ts","../src/adt/adt.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;;;KAOK,gBACG,CAAA,UAAA;EAA4B,SAAA,IAAA,EAAA,MAAA;CAAoB,EAAA,OAAA,CAAA,GAAA,QAAhD,CAAoB,CAAA,MAAA,CAAA,GAAA,CAAA,KAAA,EAAA,OAA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