@types/magnet-uri
    TypeScript icon, indicating that this package has built-in type declarations

    5.1.3 • Public • Published

    Installation

    npm install --save @types/magnet-uri

    Summary

    This package contains type definitions for magnet-uri (https://github.com/webtorrent/magnet-uri).

    Details

    Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/magnet-uri.

    index.d.ts

    // Type definitions for magnet-uri 5.1
    // Project: https://github.com/webtorrent/magnet-uri
    // Definitions by: Tomasz Łaziuk <https://github.com/tlaziuk>
    // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
    
    /// <reference types="node" />
    
    declare const MagnetUri: MagnetUri.MagnetUri;
    
    declare namespace MagnetUri {
        interface MagnetUri {
            (uri: string): Instance;
            decode(uri: string): Instance;
            encode(parsed: Instance): string;
        }
    
        interface Instance extends Object {
            dn?: string | string[] | undefined;
            tr?: string | string[] | undefined;
            xs?: string | string[] | undefined;
            as?: string | string[] | undefined;
            ws?: string | string[] | undefined;
            kt?: string[] | undefined;
            ix?: number | number[] | undefined;
            xt?: string | string[] | undefined;
            infoHash?: string | undefined;
            infoHashBuffer?: Buffer | undefined;
            name?: string | string[] | undefined;
            keywords?: string | string[] | undefined;
            announce?: string[] | undefined;
            urlList?: string[] | undefined;
        }
    }
    
    export = MagnetUri;

    Additional Details

    • Last updated: Thu, 08 Jul 2021 16:23:54 GMT
    • Dependencies: @types/node
    • Global values: none

    Credits

    These definitions were written by Tomasz Łaziuk.

    Keywords

    none

    Install

    npm i @types/magnet-uri

    DownloadsWeekly Downloads

    1,355

    Version

    5.1.3

    License

    MIT

    Unpacked Size

    4.95 kB

    Total Files

    4

    Last publish

    Collaborators

    • types