From 315cdfc4b1fc2760e4a8a36feb718626a66d5056 Mon Sep 17 00:00:00 2001 From: mallusrgreat Date: Sat, 1 Jun 2024 20:41:49 +0530 Subject: [PATCH] Fix typescript types syntax for setCommandBlock (#3366) --- index.d.ts | 16 +++++++++------- package.json | 2 +- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/index.d.ts b/index.d.ts index 36885d720..759747614 100644 --- a/index.d.ts +++ b/index.d.ts @@ -165,6 +165,13 @@ export interface BotEvents { particle: (particle: Particle) => Promise | void } +export interface CommandBlockOptions { + mode: number, + trackOutput: boolean, + conditional: boolean, + alwaysActive: boolean +} + export interface Bot extends TypedEmitter { username: string protocolVersion: string @@ -380,13 +387,8 @@ export interface Bot extends TypedEmitter { ) => Promise - export interface CommandBlockOptions { - mode: number, - trackOutput: boolean, - conditional: boolean, - alwaysActive: boolean - } - export function setCommandBlock(pos: Vec3, command: string, options: CommandBlockOptions) => void + + setCommandBlock: (pos: Vec3, command: string, options: CommandBlockOptions) => void clickWindow: ( slot: number, diff --git a/package.json b/package.json index a3115dde0..fc6a5714f 100644 --- a/package.json +++ b/package.json @@ -47,6 +47,6 @@ "mocha": "^10.0.0", "standard": "^17.0.0", "standard-markdown": "^7.1.0", - "typescript": "^5.0.3" + "typescript": "^5.4.5" } }