@types/magnet-uri
v7.0.0
Published
TypeScript definitions for magnet-uri
Downloads
45,954
Readme
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
export interface Instance {
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;
so?: any;
infoHash?: string | undefined;
infoHashBuffer?: Uint8Array | undefined;
infoHashV2?: string | undefined;
infoHashV2Buffer?: Uint8Array | undefined;
publicKey?: string | undefined;
publicKeyBuffer?: Uint8Array | undefined;
name?: string | undefined;
keywords?: string[] | undefined;
announce?: string[] | undefined;
urlList?: string[] | undefined;
peerAddresses?: string[] | undefined;
[key: string]: any;
}
/**
* Parse a magnet URI and return an object of keys/values
*/
export default function magnetURIDecode(uri: string): Instance;
/**
* Encode an object of keys/values into a magnet URI string
*/
export function encode(obj: Instance): string;
/**
* Parse a magnet URI (alias for default export)
*/
export function decode(uri: string): Instance;
Additional Details
- Last updated: Thu, 06 Aug 2026 13:05:46 GMT
- Dependencies: none
Credits
These definitions were written by Tomasz Łaziuk.
