# @types/redis-server

> TypeScript definitions for redis-server

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

## Install

```sh
npm install @types/redis-server
pnpm add @types/redis-server
yarn add @types/redis-server
bun add @types/redis-server
```

## 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.2.2 |
| Published | 2023-11-07 |
| First published | 2022-07-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 5.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51448 |
| Maintainers | types |

## Links

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

## Recent versions

- 1.2.2 (latest) — 2023-11-07
- 1.2.0 (ts4.0) — 2022-07-08
- 1.2.1 — 2023-10-18

## README

# Installation
> `npm install --save @types/redis-server`

# Summary
This package contains type definitions for redis-server (https://github.com/BrandonZacharie/node-redis-server).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/redis-server.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/redis-server/index.d.ts)
````ts
export = RedisServer;

declare namespace RedisServer {
    interface RedisServerOptions {
        /**
         * A Redis server binary path.
         */
        bin?: string;
        /**
         * A Redis server configuration file path.
         */
        conf?: string;
        /**
         * A port to bind a Redis server to.
         */
        port?: number;
        /**
         * An address of a Redis server to sync with.
         */
        slaveof?: string;
    }
}

declare class RedisServer {
    /**
     * Determine if the instance is starting a Redis server; `true` while a process is spawning,
     * and/or about to be spawned, until the contained Redis server either starts or errs.
     */
    isOpening: boolean;
    /**
     * Determine if the instance is running a Redis server; `true` once a process has spawned and
     * the contained Redis server is ready to service requests.
     */
    isRunning: boolean;
    /**
     * Determine if the instance is closing a Redis server; `true` while a process is being,
     * or about to be, killed until the contained Redis server either closes or errs.
     */
    isClosing: boolean;
    /**
     * @param options A number or string that is a port or an object for configuration.
     */
    constructor(options?: string | number | RedisServer.RedisServerOptions);
    /** Attempt to open a Redis server. Returns a `Promise`. */
    open(callback?: (err: Error | null) => void): Promise<void>;
    /**
     * Close the associated Redis server. Returns a `Promise`.
     *
     * NOTE: Disconnect clients prior to calling this method to avoid receiving connection errors
     * from clients.
     */
    close(callback?: (err: Error | null) => void): Promise<void>;
}

````

### Additional Details
 * Last updated: Tue, 07 Nov 2023 15:11:36 GMT
 * Dependencies: none

# Credits
These definitions were written by [Sander Timmermans](https://github.com/Noldaru).

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