Compare commits

..

3 Commits

Author SHA1 Message Date
Timofey Gelazoniya afdaa9eb3e
chore(package.json): bump version to 1.2.2 2023-12-12 00:44:41 +03:00
Timofey Gelazoniya 435899309f
Merge pull request #4 from sya-ri/fix-types/optional
fix(types): Change options to optional
2023-12-12 00:44:20 +03:00
sya-ri 13e6b8c6ff
fix(types): Change options to optional 2023-12-09 22:38:37 +09:00
3 changed files with 8 additions and 7 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "@minescope/mineping", "name": "@minescope/mineping",
"version": "1.2.1", "version": "1.2.2",
"description": "Ping both Minecraft Bedrock and Java servers.", "description": "Ping both Minecraft Bedrock and Java servers.",
"main": "index.js", "main": "index.js",
"types": "types/index.d.ts", "types": "types/index.d.ts",

View File

@ -3,8 +3,8 @@
* @param timeout The read/write socket timeout. * @param timeout The read/write socket timeout.
*/ */
export type BedrockPingOptions = { export type BedrockPingOptions = {
port: number, port?: number | undefined,
timeout: number; timeout?: number | undefined;
}; };
export type BedrockPingResponse = { export type BedrockPingResponse = {
@ -26,6 +26,7 @@ export type BedrockPingResponse = {
* The optional `options` argument can be an object with a `ping` (default is `19132`) or/and `timeout` (default is `5000`) property. * The optional `options` argument can be an object with a `ping` (default is `19132`) or/and `timeout` (default is `5000`) property.
* *
* @param host The Bedrock server address. * @param host The Bedrock server address.
* @param options The configuration for pinging Minecraft Bedrock server.
* *
* ```js * ```js
* import { pingBedrock } from '@minescope/mineping'; * import { pingBedrock } from '@minescope/mineping';

6
types/lib/java.d.ts vendored
View File

@ -4,9 +4,9 @@
* @param protocolVersion The protocol version. * @param protocolVersion The protocol version.
*/ */
export type JavaPingOptions = { export type JavaPingOptions = {
port: number, port?: number | undefined,
timeout: number, timeout?: number | undefined,
protocolVersion: number; protocolVersion?: number | undefined;
}; };
/** /**