Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletions types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import Client from './lib/Client';
import EventEmitter from './lib/EventEmitter';
import Logger from './lib/Logger';

class EventEmitter {
declare class EventEmitter {
constructor();
setMaxListeners(n: number): void;
emit(eventType: string, ...args: any[]): boolean;
Expand All @@ -26,7 +26,7 @@ type ChannelName = `#${string}`;

type LogLevel = 'trace' | 'debug' | 'info' | 'warn' | 'error' | 'fatal';

namespace Options {
declare namespace Options {
export interface Options {
/**
* Automatically set the log level to "info", otherwise it's set to
Expand Down Expand Up @@ -166,7 +166,7 @@ interface Badges {
/**
* @see https://dev.twitch.tv/docs/irc/tags/#globaluserstate-tags
*/
interface GlobalUserstate {
export interface GlobalUserstate {
'badge-info': BadgeInfo | null;
badges: Badges | null;
/**
Expand Down Expand Up @@ -198,7 +198,7 @@ interface Userstate extends Omit<GlobalUserstate, 'user-id'> {
interface IRCMessage {
}

class ClientBase extends EventEmitter {
declare class ClientBase extends EventEmitter {
/**
* The input options for the client.
*/
Expand Down Expand Up @@ -301,7 +301,7 @@ class ClientBase extends EventEmitter {
handleMessage(message: IRCMessage): void;
}

class Client extends ClientBase {
export class Client extends ClientBase {

/**
* Send action message (/me <message>) on a channel.
Expand Down Expand Up @@ -539,5 +539,3 @@ interface Client {
}

// TODO: Events

export = { Client };