Skip to content

Commit

Permalink
Allow Eris() for TypeScript (#545)
Browse files Browse the repository at this point in the history
  • Loading branch information
apacheli authored and abalabahaha committed Oct 18, 2019
1 parent b53475f commit 3fbec3a
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions index.d.ts
@@ -1,9 +1,11 @@
declare module "eris" {
import { EventEmitter } from "events";
import { Readable as ReadableStream } from "stream";
import { Agent as HTTPSAgent } from "https";

declare function Eris(token: string, options?: Eris.ClientOptions): Eris.Client;

declare namespace Eris {
// TODO good hacktoberfest PR: implement ShardManager, RequestHandler and other stuff
import { EventEmitter } from "events";
import { Readable as ReadableStream } from "stream";
import { Agent as HTTPAgent } from "http";
import { Agent as HTTPSAgent } from "https";

export const VERSION: string;
interface JSONCache { [s: string]: any; }
Expand Down Expand Up @@ -463,7 +465,7 @@ declare module "eris" {
defaultImageSize?: number;
ws?: any;
latencyThreshold?: number;
agent?: HTTPAgent | HTTPSAgent
agent?: HTTPSAgent
}
interface CommandClientOptions {
defaultHelpCommand?: boolean;
Expand Down Expand Up @@ -1642,3 +1644,5 @@ declare module "eris" {
public unregisterCommand(label: string): void;
}
}

export = Eris;

0 comments on commit 3fbec3a

Please sign in to comment.