Merge pull request #4 from sya-ri/fix-types/optional

fix(types): Change options to optional
This commit is contained in:
Timofey Gelazoniya 2023-12-12 00:44:20 +03:00 committed by GitHub
commit 435899309f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 5 deletions

View File

@ -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';

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

@ -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;
};
/**