export interface CommonDeeplinkOptions {
    /**
     * Protocol to use for deeplink
     * - `tg` - use `tg://` protocol links (default)
     * - `http` - use `http://` protocol
     * - `https` - use `https://` protocol
     * - `none` - don't use any protocol
     *
     * @default  'https'
     */
    protocol?: 'tg' | 'http' | 'https' | 'none';
    /**
     * For protocols except `tg://`, domain to use
     *
     * @default  't.me'
     */
    domain?: string;
}
type InputQuery = Record<string, string | number | true | undefined> | null;
interface BuildDeeplinkOptions<T> {
    internalBuild?: (options: T) => [string, InputQuery];
    internalParse?: (path: string, query: URLSearchParams) => T | null;
    externalBuild?: (options: T) => [string, InputQuery];
    externalParse?: (path: string, query: URLSearchParams) => T | null;
}
export interface Deeplink<T> {
    (options: T & CommonDeeplinkOptions): string;
    parse: (url: string) => T | null;
}
export declare function deeplinkBuilder<T>(params: BuildDeeplinkOptions<T>): Deeplink<T>;
export {};
