//#region src/option.d.ts
/**
* Present value variant.
*
* @template A Value type.
*
* @example
* const option = new Some(42);
* option.value // 42
* option.status // "some"
*/
declare class Some {
readonly value: A;
readonly status: "some";
constructor(value: A);
/** Returns true, narrowing Option to Some. */
isSome(): this is Some;
/** Returns false, narrowing Option to None. */
isNone(): this is None;
/**
* Transforms value.
*
* @template B Transformed type.
* @param fn Transformation function.
* @returns Some with transformed value.
* @throws {Panic} If fn throws.
*
* @example
* some(2).map(x => x * 2) // Some(4)
*/
map(fn: (a: A) => B): Some;
/**
* Chains Option-returning function.
*
* @template B New value type.
* @param fn Function returning Option.
* @returns Option from fn.
* @throws {Panic} If fn throws.
*
* @example
* some(2).andThen(x => x > 0 ? some(x) : none()) // Some(2)
*/
andThen(fn: (a: A) => Option): Option;
/**
* Chains async Option-returning function.
*
* @template B New value type.
* @param fn Async function returning Option.
* @returns Promise of Option from fn.
* @throws {Panic} If fn throws synchronously or rejects.
*
* @example
* await some(1).andThenAsync(async x => some(await fetchData(x)))
*/
andThenAsync(fn: (a: A) => Promise