Skip to content

Commit

Permalink
Use NullChannel return type explicitly
Browse files Browse the repository at this point in the history
  • Loading branch information
dennisprudlo committed Nov 2, 2024
1 parent 24e75f7 commit 2b123dc
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/connector/null-connector.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import { Connector } from './connector';
import { NullChannel, NullPrivateChannel, NullPresenceChannel, NullEncryptedPrivateChannel } from './../channel';

type AnyNullChannel = NullChannel | NullPrivateChannel | NullEncryptedPrivateChannel | NullPresenceChannel;

/**
* This class creates a null connector.
*/
Expand All @@ -22,14 +20,14 @@ export class NullConnector extends Connector<NullChannel, NullPrivateChannel, Nu
/**
* Listen for an event on a channel instance.
*/
listen(name: string, event: string, callback: Function): AnyNullChannel {
listen(name: string, event: string, callback: Function): NullChannel {
return new NullChannel();
}

/**
* Get a channel instance by name.
*/
channel(name: string): AnyNullChannel {
channel(name: string): NullChannel {
return new NullChannel();
}

Expand Down

0 comments on commit 2b123dc

Please sign in to comment.