/** * Result pattern for handling operations that might fail * Provides type-safe error handling without exceptions */ export declare abstract class Result { /** * Check if result is successful */ abstract get isSuccess(): boolean; /** * Check if result is failed */ abstract get isFailure(): boolean; /** * Get the success value (throws if failed) */ abstract get value(): T; /** * Get the error value (throws if successful) */ abstract get error(): E; /** * Create a successful result */ static success(value: T): Result; /** * Create a failed result */ static failure(error: E): Result; /** * Get the success value or a default */ getOrDefault(defaultValue: T): T; /** * Get the success value or throw the error */ getOrThrow(): T; /** * Transform successful result */ map(fn: (value: T) => U): Result; /** * Transform failed result */ mapError(fn: (error: E) => F): Result; /** * Chain operations */ flatMap(fn: (value: T) => Result): Result; } /** * Internal function to set implementations * @internal */ export declare function _setResultImplementations(successFactory: (value: T) => Result, failureFactory: (error: E) => Result): void; //# sourceMappingURL=Result.d.ts.map