import { VimPartialSettings } from '../vimSettings';
import { Vim } from '../vim';
import { Result } from '../../../../utils/result';
import { VimSource } from '../..';
import { IProgressLogs } from 'vim-format';
export type RequestSource = {
    url?: string;
    buffer?: ArrayBuffer;
    headers?: Record<string, string>;
};
/**
 * Initiates a request to load a VIM object from a given source.
 * @param options a url where to find the vim file or a buffer of a vim file.
 * @param settings the settings to configure how the vim will be loaded.
 * @returns a request object that can be used to track progress and get the result.
 */
export declare function requestVim(options: RequestSource, settings?: VimPartialSettings): VimRequest;
/**
 * A class that represents a request to load a VIM object from a given source.
 */
export declare class VimRequest {
    private _source;
    private _settings;
    private _bfast;
    private _isDone;
    private _vimResult?;
    private _error?;
    private _progress;
    private _progressPromise;
    private _completionPromise;
    constructor(source: VimSource, settings: VimPartialSettings);
    /**
     * Initiates the asynchronous request and handles progress updates.
     */
    private startRequest;
    private end;
    getResult(): Promise<Result<Vim>>;
    /**
     * Async generator that yields progress updates.
     * @returns An AsyncGenerator yielding IProgressLogs.
     */
    getProgress(): AsyncGenerator<IProgressLogs, void, void>;
    abort(): void;
}
