Skip to content

Commit

Permalink
Export interfaces and named fn in type definitions; bump to v2.0.6
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewchilds committed Dec 2, 2022
1 parent 5b9421f commit f4bb1a8
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "slack-notify",
"description": "A simple Node.js wrapper around the Slack webhook API.",
"version": "2.0.5",
"version": "2.0.6",
"repository": "https://github.com/andrewchilds/slack-notify.git",
"homepage": "https://github.com/andrewchilds/slack-notify",
"main": "./src/esm/index.mjs",
Expand Down
20 changes: 10 additions & 10 deletions src/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
declare module 'slack-notify' {
interface SlackNofifier {
export interface SlackNotifier {
send(args: string | SendArgs): Promise<void>;
}

interface SlackNotify extends SlackNofifier {
extend(args: string | SendArgs): SlackNofifier;
success(args: string | SendArgs): SlackNofifier;
bug(args: string | SendArgs): SlackNofifier;
alert(args: string | SendArgs): SlackNofifier;
export interface SlackNotify extends SlackNotifier {
extend(args: string | SendArgs): SlackNotifier;
success(args: string | SendArgs): Promise<void>;
bug(args: string | SendArgs): Promise<void>;
alert(args: string | SendArgs): Promise<void>;
}

interface SendArgs {
export interface SendArgs {
text: string;
blocks?: any;
channel?: string;
Expand All @@ -22,19 +22,19 @@ declare module 'slack-notify' {
fields?: { [key: string]: string };
}

interface SendAttachment {
export interface SendAttachment {
fallback: string;
color: string;
fields?: SendAttachmentField[];
}

interface SendAttachmentField {
export interface SendAttachmentField {
title: string;
value: string;
short: boolean;
}

function SlackNotifyFactory(webhookUrl: string): SlackNotify;
export function SlackNotifyFactory(webhookUrl: string): SlackNotify;

export default SlackNotifyFactory;
}

0 comments on commit f4bb1a8

Please sign in to comment.