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

2.0.9 • Public • Published

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 09:09:39 GMT
  • Dependencies: @types/node

Credits

These definitions were written by Xavier Stouder.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/musicmetadata

Weekly Downloads

17

Version

2.0.9

License

MIT

Unpacked Size

4.74 kB

Total Files

5

Last publish

Collaborators

  • types