@types/mcping-js
TypeScript icon, indicating that this package has built-in type declarations

1.5.4 • Public • Published

Installation

npm install --save @types/mcping-js

Summary

This package contains type definitions for mcping-js (https://github.com/Cryptkeeper/mcping-js).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/mcping-js.

index.d.ts

// TypeScript Version: 3.8
export interface PingResponse {
    version: {
        name: string;
        protocol: number;
    };

    players: {
        max: number;
        online: number;
        sample?:
            | Array<{
                name: string;
                id: string;
            }>
            | undefined;
    };

    description: {
        text: string;
    };

    favicon: string;
}

export class MinecraftServer {
    constructor(host: string, port?: number);
    ping(
        timeout: number,
        protocolVersion: number | undefined,
        callback: (err?: Error, res?: PingResponse) => void,
    ): void;
}

Additional Details

  • Last updated: Tue, 07 Nov 2023 09:09:39 GMT
  • Dependencies: none

Credits

These definitions were written by Inrix.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/mcping-js

Weekly Downloads

11

Version

1.5.4

License

MIT

Unpacked Size

3.8 kB

Total Files

5

Last publish

Collaborators

  • types