# @types/nssm

> TypeScript definitions for nssm

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

## Install

```sh
npm install @types/nssm
pnpm add @types/nssm
yarn add @types/nssm
bun add @types/nssm
```

## 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; pre 1.0.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 0.1.5 |
| Published | 2023-11-07 |
| First published | 2019-02-14 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 5.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51442 |
| Maintainers | types |

## Links

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

## Recent versions

- 0.1.5 (latest) — 2023-11-07
- 0.1.2 (ts3.6) — 2021-07-08
- 0.1.1 (ts2.3) — 2019-02-14
- 0.1.4 — 2023-10-18
- 0.1.3 — 2023-09-23
- 0.1.0 — 2019-02-14

## README

# Installation
> `npm install --save @types/nssm`

# Summary
This package contains type definitions for nssm (https://github.com/alykoshin/nssm).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/nssm.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/nssm/index.d.ts)
````ts
type Command =
    | "install"
    | "remove"
    | "start"
    | "stop"
    | "restart"
    | "status"
    | "pause"
    | "continue"
    | "rotate"
    | "get"
    | "set"
    | "reset";

type NssmThen<T> = <TResult1 = T, TResult2 = never>(
    onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | null,
    onrejected?: ((reason: Error, stderr: string) => TResult2 | PromiseLike<TResult2>) | null,
) => NssmPromise<TResult1 | TResult2>;

type NssmCatch<T> = <TResult = never>(
    onrejected?: ((reason: Error, stderr: string) => TResult | PromiseLike<TResult>) | null,
) => NssmPromise<T | TResult>;

interface NssmPromise<T> extends Promise<T> {
    then: NssmThen<T>;
    catch: NssmCatch<T>;
}

type CallbackFn = (error?: string, result?: string) => void;
type ZeroArgCommandFn = (callback: CallbackFn) => void;
type OneArgCommandFn = (arg1: string, callback: CallbackFn) => void;
type TwoArgCommandFn = (arg1: string, arg2: string, callback: CallbackFn) => void;
type PromiseCommandFn = (arg1?: string, arg2?: string) => NssmPromise<string>;

type NssmCommandFn =
    & ZeroArgCommandFn
    & OneArgCommandFn
    & TwoArgCommandFn
    & PromiseCommandFn;

export = nssm;

declare function nssm(serviceName: string, options?: nssm.NssmOptions): nssm.Nssm;

declare namespace nssm {
    type Nssm = {
        [key in Command]: NssmCommandFn;
    };

    interface NssmOptions {
        nssmExe?: string | undefined;
    }
}

````

### Additional Details
 * Last updated: Tue, 07 Nov 2023 09:09:39 GMT
 * Dependencies: none

# Credits
These definitions were written by [Joram van den Boezem](https://github.com/hongaar).

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