npm.io
2.0.9 • Published 2 years ago

@types/musicmetadata

Licence
MIT
Version
2.0.9
Deps
1
Size
5 kB
Vulns
0
Weekly
0
Stars
51.4K

Installation

npm install --save @types/musicmetadata

Summary

This package contains type definitions for musicmetadata (https://www.npmjs.com/package/musicmetadata).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/musicmetadata.

index.d.ts

/// <reference types="node" />

declare module "musicmetadata" {
    import { Readable } from "stream";
    import { EventEmitter } from "events";

    function mm(readStream: Readable, callback: (err: Error, metadata: MM.Metadata) => void): EventEmitter;
    function mm(
        readStream: Readable,
        options: MM.Options,
        callback: (err: Error, metadata: MM.Metadata) => void,
    ): EventEmitter;

    namespace mm {}

    export = mm;
}

declare namespace MM {
    export interface Options {
        duration?: boolean | undefined;
        fileSize?: number | undefined;
    }

    export interface Metadata {
        artist: string[];
        album: string;
        albumartist: string[];
        title: string;
        year: string;
        track: NoOf;
        disk: NoOf;
        genre: string[];
        picture: Picture[];
        duration: number;
    }

    export interface NoOf {
        no: number;
        of: number;
    }

    export interface Picture {
        format: string;
        data: Buffer;
    }
}

Additional Details

  • Last updated: Tue, 07 Nov 2023 0939 GMT
  • Dependencies: @types/node

Credits

These definitions were written by Xavier Stouder.