# @types/slack-node

> TypeScript definitions for slack-node

Latest version **0.1.8** (published 2025-10-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/slack-node
pnpm add @types/slack-node
yarn add @types/slack-node
bun add @types/slack-node
```

## Health

**Score 65/100 (B)** — status: stable.

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

Warnings: low downloads; no esm support; pre 1.0.

## Facts

| | |
|---|---|
| Version | 0.1.8 |
| Published | 2025-10-24 |
| First published | 2016-10-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 4.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51450 |
| Maintainers | types |

## Links

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

## Dependencies (1)

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

## Recent versions

- 0.1.8 (latest) — 2025-10-24
- 0.1.7 (ts5.1) — 2023-11-07
- 0.1.4 (ts4.1) — 2021-07-06
- 0.1.3 (ts3.5) — 2020-05-15
- 0.1.2 (ts2.7) — 2017-11-09
- 0.1.1 (ts2.0) — 2016-10-26
- 0.1.6 — 2023-10-18
- 0.1.5 — 2023-09-25

## README

# Installation
> `npm install --save @types/slack-node`

# Summary
This package contains type definitions for slack-node (https://github.com/clonn/slack-node-sdk).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/slack-node.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/slack-node/index.d.ts)
````ts
import request = require("request");

declare class Slack {
    token: string;
    domain: string;
    apiMode: boolean;
    url: string;
    timeout: number;
    maxAttempts: number;

    constructor(token?: string, domain?: string);
    composeUrl(): string;
    setWebhook(url: string): this;
    detectEmoji(emoji: string): { key: "icon_url" | "icon_emoji"; val: string };
    webhook(options: Slack.WebhookOptions, callback: (err: any, response: Slack.WebhookResponse) => void): void;
    api(method: string, callback: (err: any, response: any) => void): this;
    api(method: string, options: any, callback: (err: any, response: any) => void): this;
}

declare namespace Slack {
    export interface WebhookOptions {
        icon_emoji?: string | undefined;
        response_type?: string | undefined;
        channel?: string | undefined;
        text?: string | undefined;
        username?: string | undefined;
        attachments?: any[] | undefined;
        link_names?: any;
    }

    export interface WebhookResponse {
        status: "fail" | "ok";
        statusCode: number;
        headers: any;
        response: any;
    }
}

export = Slack;

````

### Additional Details
 * Last updated: Fri, 24 Oct 2025 04:02:41 GMT
 * Dependencies: [@types/request](https://npmjs.com/package/@types/request)

# Credits
These definitions were written by [Joshua DeVinney](https://github.com/geoffreak).

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