Skip to content

Commit

Permalink
Merge pull request #43 from fernando-almeida/master
Browse files Browse the repository at this point in the history
fix misleading typings to match 4.x.y docs
  • Loading branch information
RangerMauve authored Jan 23, 2022
2 parents 6597b18 + e8900c5 commit 6fb4b27
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,8 @@ import {
IClientOptions,
IClientPublishOptions,
IClientSubscribeOptions,
IPublishPacket,
ISubscriptionGrant,
ISubscriptionMap,
IUnsubackPacket,
PacketCallback,
} from 'mqtt';

export * from 'mqtt/types/lib/client-options';
Expand Down Expand Up @@ -55,11 +52,11 @@ export declare class AsyncMqttClient extends MqttClient {
/* original */ public subscribe (topic: string | string[], opts: IClientSubscribeOptions, callback: never): this
/* original */ public subscribe (topic: string | string[] | ISubscriptionMap, callback: never): this

public unsubscribe (topic: string | string[]): Promise<IUnsubackPacket>
public unsubscribe (topic: string | string[]): Promise<void>
/* original */ public unsubscribe (topic: string | string[], callback: never): this;

public publish (topic: string, message: string | Buffer, opts: IClientPublishOptions): Promise<IPublishPacket>
public publish (topic: string, message: string | Buffer): Promise<IPublishPacket>
public publish (topic: string, message: string | Buffer, opts: IClientPublishOptions): Promise<void>
public publish (topic: string, message: string | Buffer): Promise<void>
/* original */ public publish (topic: string, message: string | Buffer, opts: IClientPublishOptions, callback: never): this
/* original */ public publish (topic: string, message: string | Buffer, callback: never): this

Expand Down

0 comments on commit 6fb4b27

Please sign in to comment.