Skip to content

Commit

Permalink
fix: webhook should not be extending the evenet emitter
Browse files Browse the repository at this point in the history
Signed-off-by: sarthakjdev <[email protected]>
  • Loading branch information
sarthakjdev committed May 29, 2024
1 parent 48fca50 commit dbe290d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
3 changes: 2 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,5 @@
#--------------------------------------------

# (Add your project-specific overrides here)
!/template/**
!/template/**
node_modules
3 changes: 1 addition & 2 deletions packages/wapi.js/src/webhook/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ import { type WebhookInterface } from "./interface";
* @extends {EventEmitter}
* @implements {WebhookInterface}
*/
export class Webhook extends EventEmitter implements WebhookInterface {
export class Webhook implements WebhookInterface {
private endpoint: string;
private port = 3000;
private server: Express;
Expand All @@ -83,7 +83,6 @@ export class Webhook extends EventEmitter implements WebhookInterface {
webhookEndpoint: string;
port: number;
}) {
super();
this.client = params.client;
this.endpoint = params.webhookEndpoint;
this.webhookSecret = params.webhookSecret;
Expand Down
2 changes: 1 addition & 1 deletion packages/wapi.js/src/webhook/interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import type EventEmitter from "events";
* @interface WebhookInterface
* @extends {EventEmitter}
*/
export interface WebhookInterface extends EventEmitter {
export interface WebhookInterface {
/**
* Gets the endpoint of the webhook.
* @returns The endpoint URL.
Expand Down

0 comments on commit dbe290d

Please sign in to comment.