Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.
Open
Show file tree
Hide file tree
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
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand All @@ -9,6 +9,7 @@
"es6"
],
"main": "rcon.js",
"typings": "rcon.d.ts",
"repository": "levrik/node-modern-rcon",
"author": "Levin Ricket <me@levrik.io>",
"license": "MIT",
Expand Down
23 changes: 23 additions & 0 deletions rcon.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/// <reference types="node" />

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wasn't these reference comments removed from TypeScript?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As far as I know they still work. Might be deprecated.
It depends on your module structure.

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<void>;

disconnect(): Promise<void>;

send(data: string): Promise<string>;
}

exports = Rcon;