@dangayle/rustlike 0.1.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.
@@ -0,0 +1,342 @@
1
+ import { _ as Some, a as asyncIterFromGenerator, b as isOk, c as PeekableIter, d as iterFromGenerator, f as Err, g as Result, h as Option, i as asyncIterFromArray, l as iter, m as Ok, n as PeekableAsyncIter, o as asyncIterFromIterable, p as None, r as asyncIter, s as Iter, t as AsyncIter, u as iterFromArray, v as isErr, x as isSome, y as isNone } from "./async-iter-1OXm1ncF.mjs";
2
+
3
+ //#region src/async.d.ts
4
+ declare class AsyncResult<T, E> implements PromiseLike<Result<T, E>> {
5
+ private readonly promise;
6
+ constructor(promise: Promise<Result<T, E>>);
7
+ /**
8
+ * Create an AsyncResult from a Promise<Result<T, E>>
9
+ */
10
+ static fromPromise<T, E>(promise: Promise<Result<T, E>>): AsyncResult<T, E>;
11
+ /**
12
+ * Create an AsyncResult that resolves to Ok(value)
13
+ */
14
+ static ok<T, E = never>(value: T): AsyncResult<T, E>;
15
+ /**
16
+ * Create an AsyncResult that resolves to Err(error)
17
+ */
18
+ static err<E, T = never>(error: E): AsyncResult<T, E>;
19
+ /**
20
+ * Wrap an async function that might reject into an AsyncResult.
21
+ * This is the async equivalent of Result.fromThrowable().
22
+ *
23
+ * @example
24
+ * const result = await AsyncResult.fromThrowable(() => fetch('/api/users'));
25
+ * // AsyncResult<Response, unknown>
26
+ */
27
+ static fromThrowable<T, E = unknown>(fn: () => Promise<T>): AsyncResult<T, E>;
28
+ /**
29
+ * Map the inner Ok value using a synchronous or asynchronous function.
30
+ * If the function returns a Promise, it is awaited.
31
+ */
32
+ map<U>(fn: (value: T) => U | Promise<U>): AsyncResult<U, E>;
33
+ /**
34
+ * Map the inner Err value using a synchronous or asynchronous function.
35
+ */
36
+ mapErr<F>(fn: (error: E) => F | Promise<F>): AsyncResult<T, F>;
37
+ /**
38
+ * Chain another Result-returning operation (sync or async).
39
+ * Supports returning: Result, AsyncResult, or Promise<Result>.
40
+ */
41
+ andThen<U>(fn: (value: T) => Result<U, E> | AsyncResult<U, E> | Promise<Result<U, E>>): AsyncResult<U, E>;
42
+ /**
43
+ * Handle the error case with another Result-returning operation.
44
+ */
45
+ orElse<F>(fn: (error: E) => Result<T, F> | AsyncResult<T, F> | Promise<Result<T, F>>): AsyncResult<T, F>;
46
+ /**
47
+ * Inspect the Ok value if present, without modifying it.
48
+ * The callback can be synchronous or asynchronous.
49
+ */
50
+ inspect(fn: (value: T) => void | Promise<void>): AsyncResult<T, E>;
51
+ /**
52
+ * Inspect the Err value if present, without modifying it.
53
+ * The callback can be synchronous or asynchronous.
54
+ */
55
+ inspectErr(fn: (error: E) => void | Promise<void>): AsyncResult<T, E>;
56
+ /**
57
+ * Pattern match on the result (async).
58
+ */
59
+ match<U>(handlers: {
60
+ ok: (value: T) => U | Promise<U>;
61
+ err: (error: E) => U | Promise<U>;
62
+ }): Promise<U>;
63
+ /**
64
+ * Unwrap the value or throw (reject).
65
+ */
66
+ unwrap(): Promise<T>;
67
+ /**
68
+ * Unwrap or return default.
69
+ */
70
+ unwrapOr(defaultValue: T): Promise<T>;
71
+ /**
72
+ * Unwrap or compute default.
73
+ */
74
+ unwrapOrElse(fn: (error: E) => T | Promise<T>): Promise<T>;
75
+ /**
76
+ * Returns true if the result is Ok and contains the given value.
77
+ */
78
+ contains(value: T): Promise<boolean>;
79
+ /**
80
+ * Returns true if the result is Err and contains the given error.
81
+ */
82
+ containsErr(error: E): Promise<boolean>;
83
+ /**
84
+ * Returns `other` if the result is Ok, otherwise returns the Err value of self.
85
+ */
86
+ and<U>(other: AsyncResult<U, E>): AsyncResult<U, E>;
87
+ /**
88
+ * Returns `other` if the result is Err, otherwise returns the Ok value of self.
89
+ */
90
+ or<F>(other: AsyncResult<T, F>): AsyncResult<T, F>;
91
+ /**
92
+ * Converts from AsyncResult<Result<U, E>, E> to AsyncResult<U, E>.
93
+ */
94
+ flatten<U>(this: AsyncResult<Result<U, E>, E>): AsyncResult<U, E>;
95
+ /**
96
+ * Converts from Result<T, E> to Option<T>, discarding the error if any.
97
+ */
98
+ toOption(): Promise<Option<T>>;
99
+ /**
100
+ * Converts from Result<T, E> to Option<E>, discarding the success value if any.
101
+ */
102
+ err(): Promise<Option<E>>;
103
+ /**
104
+ * Returns the contained Ok value, or throws with the provided message.
105
+ */
106
+ expect(message: string): Promise<T>;
107
+ /**
108
+ * Returns the contained Err value, or throws if Ok.
109
+ */
110
+ unwrapErr(): Promise<E>;
111
+ /**
112
+ * Returns the contained Err value, or throws with the provided message.
113
+ */
114
+ expectErr(message: string): Promise<E>;
115
+ /**
116
+ * Get the underlying Promise<Result<T, E>>
117
+ */
118
+ toPromise(): Promise<Result<T, E>>;
119
+ /**
120
+ * Implement PromiseLike to allow `await asyncResult`
121
+ */
122
+ then<TResult1 = Result<T, E>, TResult2 = never>(onfulfilled?: ((value: Result<T, E>) => TResult1 | PromiseLike<TResult1>) | null, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null): PromiseLike<TResult1 | TResult2>;
123
+ }
124
+ //#endregion
125
+ //#region src/match.d.ts
126
+ /**
127
+ * Exhaustive pattern matching utilities
128
+ *
129
+ * Ensures all cases are handled in discriminated unions.
130
+ */
131
+ /**
132
+ * Use in the default case of a switch to ensure exhaustiveness.
133
+ * If the switch is not exhaustive, TypeScript will error because
134
+ * the unhandled case type cannot be assigned to 'never'.
135
+ *
136
+ * @example
137
+ * type Shape = { kind: 'circle'; radius: number } | { kind: 'rect'; w: number; h: number };
138
+ *
139
+ * function area(s: Shape): number {
140
+ * switch (s.kind) {
141
+ * case 'circle': return Math.PI * s.radius ** 2;
142
+ * case 'rect': return s.w * s.h;
143
+ * default: return assertNever(s);
144
+ * }
145
+ * }
146
+ */
147
+ declare function assertNever(x: never, message?: string): never;
148
+ /**
149
+ * Type-safe exhaustive matching for discriminated unions.
150
+ * Supports an optional catch-all '_' handler.
151
+ *
152
+ * @example
153
+ * type Action =
154
+ * | { type: 'increment'; amount: number }
155
+ * | { type: 'decrement'; amount: number }
156
+ * | { type: 'reset' };
157
+ *
158
+ * const result = match(action, 'type', {
159
+ * increment: (a) => state + a.amount,
160
+ * decrement: (a) => state - a.amount,
161
+ * reset: () => 0,
162
+ * });
163
+ *
164
+ * // With catch-all
165
+ * const result = match(action, 'type', {
166
+ * increment: (a) => state + a.amount,
167
+ * _: () => state // catch-all
168
+ * });
169
+ */
170
+ declare function match<T extends Record<K, string>, K extends keyof T, R>(value: T, discriminant: K, handlers: { [P in T[K]]: (value: Extract<T, Record<K, P>>) => R } | ({ [P in T[K]]?: (value: Extract<T, Record<K, P>>) => R } & {
171
+ _: (value: T) => R;
172
+ })): R;
173
+ /**
174
+ * Match on a discriminated union using the 'kind' discriminant (common pattern).
175
+ *
176
+ * @example
177
+ * type Shape =
178
+ * | { kind: 'circle'; radius: number }
179
+ * | { kind: 'rect'; w: number; h: number };
180
+ *
181
+ * const area = matchKind(shape, {
182
+ * circle: (s) => Math.PI * s.radius ** 2,
183
+ * rect: (s) => s.w * s.h,
184
+ * });
185
+ *
186
+ * // With catch-all
187
+ * const isCircle = matchKind(shape, {
188
+ * circle: () => true,
189
+ * _: () => false
190
+ * });
191
+ */
192
+ declare function matchKind<T extends {
193
+ kind: string;
194
+ }, R>(value: T, handlers: { [P in T["kind"]]: (value: Extract<T, {
195
+ kind: P;
196
+ }>) => R } | ({ [P in T["kind"]]?: (value: Extract<T, {
197
+ kind: P;
198
+ }>) => R } & {
199
+ _: (value: T) => R;
200
+ })): R;
201
+ /**
202
+ * Match on a discriminated union using the 'type' discriminant (common pattern).
203
+ *
204
+ * @example
205
+ * type Action =
206
+ * | { type: 'add'; item: string }
207
+ * | { type: 'remove'; id: number };
208
+ *
209
+ * const result = matchType(action, {
210
+ * add: (a) => [...items, a.item],
211
+ * remove: (a) => items.filter((_, i) => i !== a.id),
212
+ * });
213
+ */
214
+ declare function matchType<T extends {
215
+ type: string;
216
+ }, R>(value: T, handlers: { [P in T["type"]]: (value: Extract<T, {
217
+ type: P;
218
+ }>) => R } | ({ [P in T["type"]]?: (value: Extract<T, {
219
+ type: P;
220
+ }>) => R } & {
221
+ _: (value: T) => R;
222
+ })): R;
223
+ //#endregion
224
+ //#region src/types.d.ts
225
+ /**
226
+ * Recursively make all properties readonly (deep immutability)
227
+ */
228
+ type DeepReadonly<T> = T extends (infer U)[] ? readonly DeepReadonly<U>[] : T extends Map<infer K, infer V> ? ReadonlyMap<DeepReadonly<K>, DeepReadonly<V>> : T extends Set<infer U> ? ReadonlySet<DeepReadonly<U>> : T extends object ? { readonly [P in keyof T]: DeepReadonly<T[P]> } : T;
229
+ /**
230
+ * Make specific properties readonly
231
+ */
232
+ type ReadonlyPick<T, K extends keyof T> = Omit<T, K> & Readonly<Pick<T, K>>;
233
+ /**
234
+ * Branded type for nominal typing (like Rust's newtype pattern)
235
+ *
236
+ * @example
237
+ * type UserId = Brand<number, 'UserId'>;
238
+ * type OrderId = Brand<number, 'OrderId'>;
239
+ *
240
+ * // These are now incompatible even though both are numbers
241
+ * const userId: UserId = 1 as UserId;
242
+ * const orderId: OrderId = userId; // Error!
243
+ */
244
+ type Brand<T, B> = T & {
245
+ readonly __brand: B;
246
+ };
247
+ /**
248
+ * Create a branded type constructor
249
+ *
250
+ * @example
251
+ * const UserId = brand<number, 'UserId'>();
252
+ * const id = UserId(42); // type is Brand<number, 'UserId'>
253
+ */
254
+ declare const brand: <T, B>() => (value: T) => Brand<T, B>;
255
+ /**
256
+ * NonEmpty array type - guarantees at least one element
257
+ */
258
+ type NonEmptyArray<T> = readonly [T, ...T[]];
259
+ /**
260
+ * Check if array is non-empty (type guard)
261
+ */
262
+ declare const isNonEmpty: <T>(arr: readonly T[]) => arr is NonEmptyArray<T>;
263
+ /**
264
+ * Create a non-empty array from values
265
+ */
266
+ declare const nonEmpty: <T>(first: T, ...rest: T[]) => NonEmptyArray<T>;
267
+ /**
268
+ * Get the first element of a non-empty array (guaranteed to exist)
269
+ */
270
+ declare const head: <T>(arr: NonEmptyArray<T>) => T;
271
+ /**
272
+ * Create a newtype with validation (Rust's newtype pattern + smart constructor).
273
+ * Implements the "parse, don't validate" pattern - make invalid states unrepresentable.
274
+ *
275
+ * @example
276
+ * const EmailAddress = newtype<string, 'Email'>(
277
+ * (s) => s.includes('@'),
278
+ * "Invalid email"
279
+ * );
280
+ *
281
+ * const email = EmailAddress.parse(userInput);
282
+ * // Result<Brand<string, 'Email'>, string>
283
+ *
284
+ * @example
285
+ * const PositiveNumber = newtype<number, 'Positive'>(
286
+ * (n) => n > 0,
287
+ * (n) => `Expected positive, got ${n}`
288
+ * );
289
+ */
290
+ declare const newtype: <T, B, E = string>(validate: (value: T) => boolean, error: E | ((value: T) => E)) => {
291
+ parse: (value: T) => Result<Brand<T, B>, E>;
292
+ unsafe: (value: T) => Brand<T, B>;
293
+ };
294
+ //#endregion
295
+ //#region src/interop.d.ts
296
+ /**
297
+ * One-shot: wrap a single throwing operation in a Result.
298
+ * Use {@link safeTry} to create a reusable safe wrapper instead.
299
+ *
300
+ * @example
301
+ * const result = tryCatch(() => JSON.parse(userInput));
302
+ * // Result<unknown, unknown>
303
+ */
304
+ declare const tryCatch: <T, E = unknown>(fn: () => T) => Result<T, E>;
305
+ /**
306
+ * Wrap any async function that might reject to return Result
307
+ *
308
+ * @example
309
+ * const result = await tryAsync(() => axios.get('/api/users'));
310
+ * // Result<AxiosResponse, AxiosError>
311
+ */
312
+ declare const tryAsync: <T, E = unknown>(fn: () => Promise<T>) => Promise<Result<T, E>>;
313
+ /**
314
+ * Create a reusable Option-returning version of any function that may return
315
+ * T | null | undefined or throw. Returns None on null, undefined, or throw.
316
+ *
317
+ * @example
318
+ * const safeFind = safeCall((id: number) => users.find(u => u.id === id));
319
+ * const user = safeFind(42); // Option<User>
320
+ */
321
+ declare const safeCall: <Args extends unknown[], T>(fn: (...args: Args) => T | null | undefined) => (...args: Args) => Option<T>;
322
+ /**
323
+ * Create a reusable Option-returning version of any async function that may return
324
+ * T | null | undefined or reject. Returns None on null, undefined, or rejection.
325
+ *
326
+ * @example
327
+ * const safeFetch = safeCallAsync((url: string) => fetch(url).then(r => r.ok ? r : null));
328
+ * const response = await safeFetch('/api'); // Option<Response>
329
+ */
330
+ declare const safeCallAsync: <Args extends unknown[], T>(fn: (...args: Args) => Promise<T | null | undefined>) => (...args: Args) => Promise<Option<T>>;
331
+ /**
332
+ * Reusable: wrap a throwing function so every call returns a Result.
333
+ * Use {@link tryCatch} for one-shot operations instead.
334
+ *
335
+ * @example
336
+ * const safeJsonParse = safeTry(JSON.parse);
337
+ * const data = safeJsonParse(input); // Result<unknown, unknown>
338
+ */
339
+ declare const safeTry: <Args extends unknown[], T, E = unknown>(fn: (...args: Args) => T) => (...args: Args) => Result<T, E>;
340
+ //#endregion
341
+ export { AsyncIter, type AsyncIter as AsyncIterType, AsyncResult, type Brand, type DeepReadonly, Err, type Err as ErrType, Iter, type Iter as IterType, type NonEmptyArray, None, type None as NoneType, Ok, type Ok as OkType, Option, type Option as OptionType, type PeekableAsyncIter as PeekableAsyncIterType, type PeekableIter as PeekableIterType, type ReadonlyPick, Result, type Result as ResultType, Some, type Some as SomeType, assertNever, asyncIter, asyncIterFromArray, asyncIterFromGenerator, asyncIterFromIterable, brand, head, isErr, isNonEmpty, isNone, isOk, isSome, iter, iterFromArray, iterFromGenerator, match, matchKind, matchType, newtype, nonEmpty, safeCall, safeCallAsync, safeTry, tryAsync, tryCatch };
342
+ //# sourceMappingURL=index.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.mts","names":[],"sources":["../src/async.ts","../src/match.ts","../src/types.ts","../src/interop.ts"],"mappings":";;;cAMa,WAAA,kBAA6B,WAAA,CAAY,MAAA,CAAO,CAAA,EAAG,CAAA;EAAA,iBACjC,OAAA;cAAA,OAAA,EAAS,OAAA,CAAQ,MAAA,CAAO,CAAA,EAAG,CAAA;EADM;;;EAAA,OAMvD,WAAA,MAAA,CAAkB,OAAA,EAAS,OAA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