Skip to content

Commit

Permalink
Added TS typings
Browse files Browse the repository at this point in the history
  • Loading branch information
Pupix committed Feb 9, 2019
1 parent a88957f commit 166f3d4
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
{
"name": "lcu-connector",
"version": "2.0.0",
"version": "2.1.0",
"main": "index.js",
"license": "MIT",
"types": "types.d.ts",
"devDependencies": {
"eslint": "4.13.0",
"eslint-config-airbnb-base": "12.1.0",
Expand Down
23 changes: 23 additions & 0 deletions types.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
declare class LCUConnector {
constructor(path: string);

static getLCUPathFromProcess(): Promise<string | void>;

static isValidLCUPath(dirPath: string): boolean;

start(): void;

stop(): void;

on(event: 'connect', listener: (data: {
address: string,
port: number,
username: string,
password: string,
protocol: string
}) => void): this;

on(event: 'disconnect', listener: () => void): this;
}

export = LCUConnector;

0 comments on commit 166f3d4

Please sign in to comment.