# @types/play-sound

> TypeScript definitions for play-sound

Latest version **1.1.2** (published 2023-11-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/play-sound
pnpm add @types/play-sound
yarn add @types/play-sound
bun add @types/play-sound
```

## Health

**Score 45/100 (D)** — status: abandoned.

Positive: has types; no vulnerabilities; high maintenance score; popular repo; extremely popular.

Warnings: low downloads; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 1.1.2 |
| Published | 2023-11-07 |
| First published | 2021-05-19 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 4.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51448 |
| Maintainers | types |

## Links

- npm: https://www.npmjs.com/package/@types/play-sound
- Repository: https://github.com/DefinitelyTyped/DefinitelyTyped
- Homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/play-sound
- npm.io page: https://npm.io/package/@types/play-sound

## Dependencies (1)

- [@types/node](https://npm.io/package/@types/node.md) *

## Recent versions

- 1.1.2 (latest) — 2023-11-07
- 1.1.0 (ts3.5) — 2021-05-19
- 1.1.1 — 2023-10-18

## README

# Installation
> `npm install --save @types/play-sound`

# Summary
This package contains type definitions for play-sound (https://github.com/shime/play-sound).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/play-sound.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/play-sound/index.d.ts)
````ts
/// <reference types="node" />

import { ChildProcess, ExecException } from "child_process";

type Players = "mplayer" | "afplay" | "mpg123" | "mpg321" | "play" | "omxplayer" | "aplay" | "cmdmp3";

interface PlayOpts {
    players: Players[];
    player: Players;
}

type PlayMethodOptions = Partial<
    {
        [key in Players]: Array<string | number>;
    } & {
        timeout: number;
    }
>;

declare class Play {
    constructor(opts?: Partial<PlayOpts>);

    player: unknown;
    players: Players[];
    urlRegex: RegExp;

    play(what: string, options?: PlayMethodOptions, next?: (err: ExecException) => void): ChildProcess;
    play(what: string, next?: (err: ExecException) => void): ChildProcess;

    test(next?: (err: ExecException) => void): ChildProcess;
}

declare function defaultExport(opts?: Partial<PlayOpts>): Play;

export = defaultExport;

````

### Additional Details
 * Last updated: Tue, 07 Nov 2023 09:09:39 GMT
 * Dependencies: [@types/node](https://npmjs.com/package/@types/node)

# Credits
These definitions were written by [Corbin Crutchley](https://github.com/crutchcorn).

---
_Source: https://npm.io/package/@types/play-sound · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
