declare const MagnetUri: MagnetUri.MagnetUri;

declare module "magnet-uri" {
    declare namespace MagnetUri {
        interface MagnetUri {
            (uri: string): Instance;
            decode(uri: string): Instance;
            encode(parsed: Instance): string;
        }

        interface Instance extends Object {
            dn?: string | string[];
            tr?: string | string[];
            xs?: string | string[];
            as?: string | string[];
            ws?: string | string[];
            kt?: string[];
            ix?: number | number[];
            xt?: string | string[];
            so?: number[];
            infoHash?: string;
            infoHashBuffer?: Buffer;
            name?: string | string[];
            keywords?: string | string[];
            announce?: string[];
            urlList?: string[];
        }
    }

    export = MagnetUri;
}
