import { Codec, Constructor, InterfaceTypes } from '../types';
import Enum from './Enum';
/**
 * @name Result
 * @description
 * A Result maps to the Rust Result type, that can either wrap a success or error value
 */
export default class Result<O extends Codec, E extends Codec> extends Enum {
    constructor(Ok: Constructor<O> | InterfaceTypes, Error: Constructor<E> | InterfaceTypes, value?: any);
    static with<O extends Codec, E extends Codec>(Types: {
        Ok: Constructor<O> | InterfaceTypes;
        Error: Constructor<E> | InterfaceTypes;
    }): Constructor<Result<O, E>>;
    /**
     * @description Returns the wrapper Error value (if isError)
     */
    readonly asError: E;
    /**
     * @description Returns the wrapper Ok value (if isOk)
     */
    readonly asOk: O;
    /**
     * @description Checks if the Result has no value
     */
    readonly isEmpty: boolean;
    /**
     * @description Checks if the Result wraps an Error value
     */
    readonly isError: boolean;
    /**
     * @description Checks if the Result wraps an Ok value
     */
    readonly isOk: boolean;
    /**
     * @description Returns the base runtime type name for this instance
     */
    toRawType(): string;
}
