From 13e6b8c6ffbd460517588064ff3ef022c5d0de4c Mon Sep 17 00:00:00 2001 From: sya-ri Date: Sat, 9 Dec 2023 22:38:37 +0900 Subject: [PATCH] fix(types): Change options to optional --- types/lib/bedrock.d.ts | 5 +++-- types/lib/java.d.ts | 6 +++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/types/lib/bedrock.d.ts b/types/lib/bedrock.d.ts index 856a2c4..cf8e823 100644 --- a/types/lib/bedrock.d.ts +++ b/types/lib/bedrock.d.ts @@ -3,8 +3,8 @@ * @param timeout The read/write socket timeout. */ export type BedrockPingOptions = { - port: number, - timeout: number; + port?: number | undefined, + timeout?: number | undefined; }; 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. * * @param host The Bedrock server address. + * @param options The configuration for pinging Minecraft Bedrock server. * * ```js * import { pingBedrock } from '@minescope/mineping'; diff --git a/types/lib/java.d.ts b/types/lib/java.d.ts index af02188..8084f1a 100644 --- a/types/lib/java.d.ts +++ b/types/lib/java.d.ts @@ -4,9 +4,9 @@ * @param protocolVersion The protocol version. */ export type JavaPingOptions = { - port: number, - timeout: number, - protocolVersion: number; + port?: number | undefined, + timeout?: number | undefined, + protocolVersion?: number | undefined; }; /**