Skip to content

Commit 315cdfc

Browse files
Fix typescript types syntax for setCommandBlock (#3366)
1 parent ec76468 commit 315cdfc

2 files changed

Lines changed: 10 additions & 8 deletions

File tree

index.d.ts

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,13 @@ export interface BotEvents {
165165
particle: (particle: Particle) => Promise<void> | void
166166
}
167167

168+
export interface CommandBlockOptions {
169+
mode: number,
170+
trackOutput: boolean,
171+
conditional: boolean,
172+
alwaysActive: boolean
173+
}
174+
168175
export interface Bot extends TypedEmitter<BotEvents> {
169176
username: string
170177
protocolVersion: string
@@ -380,13 +387,8 @@ export interface Bot extends TypedEmitter<BotEvents> {
380387
) => Promise<void>
381388

382389

383-
export interface CommandBlockOptions {
384-
mode: number,
385-
trackOutput: boolean,
386-
conditional: boolean,
387-
alwaysActive: boolean
388-
}
389-
export function setCommandBlock(pos: Vec3, command: string, options: CommandBlockOptions) => void
390+
391+
setCommandBlock: (pos: Vec3, command: string, options: CommandBlockOptions) => void
390392

391393
clickWindow: (
392394
slot: number,

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,6 @@
4747
"mocha": "^10.0.0",
4848
"standard": "^17.0.0",
4949
"standard-markdown": "^7.1.0",
50-
"typescript": "^5.0.3"
50+
"typescript": "^5.4.5"
5151
}
5252
}

0 commit comments

Comments
 (0)