diff --git a/package.json b/package.json index 147e298..000b522 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "modern-rcon", - "version": "1.0.3", + "version": "1.0.4", "description": "A modern RCON client implementation written in ES2015", "keywords": [ "rcon", @@ -9,6 +9,7 @@ "es6" ], "main": "rcon.js", + "typings": "rcon.d.ts", "repository": "levrik/node-modern-rcon", "author": "Levin Ricket ", "license": "MIT", diff --git a/rcon.d.ts b/rcon.d.ts new file mode 100644 index 0000000..99db49d --- /dev/null +++ b/rcon.d.ts @@ -0,0 +1,23 @@ +/// +export declare class RconError extends Error { + constructor(message: string); +} + +declare class Rcon { + + constructor(host: string, password: string, timeout?: number); + constructor(host: string, port: number, password: string, timeout?: number); + + host: string; + port: number; + password: string; + timeout: number; + + connect(): Promise; + + disconnect(): Promise; + + send(data: string): Promise; +} + +exports = Rcon;