import type { Result } from './result.js'; /** * Replace nested Results with one `Result` of the inner value. * * Flattening only removes one level of nesting at a time * * - If given an `Ok` with a normal value, returns the `Ok` as is. * - If given an `Err` with a normal value, returns the `Err` as is. * - If given a `Result` with a `Result` value, returns the inner `Result`. * * @tags result, transform, transform-result * @see https://doc.rust-lang.org/core/result/enum.Result.html#method.flatten */ export declare function flatten(value: Res): Result extends Result.Any ? Result.OkType> : Result.OkType, Result.ErrType extends Result.Any ? Result.ErrType> : Result.ErrType>;