Skip to content

Commit

Permalink
Fix typescript types syntax for setCommandBlock (#3366)
Browse files Browse the repository at this point in the history
  • Loading branch information
mallusrgreat committed Jun 1, 2024
1 parent ec76468 commit 315cdfc
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
16 changes: 9 additions & 7 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,13 @@ export interface BotEvents {
particle: (particle: Particle) => Promise<void> | void
}

export interface CommandBlockOptions {
mode: number,
trackOutput: boolean,
conditional: boolean,
alwaysActive: boolean
}

export interface Bot extends TypedEmitter<BotEvents> {
username: string
protocolVersion: string
Expand Down Expand Up @@ -380,13 +387,8 @@ export interface Bot extends TypedEmitter<BotEvents> {
) => Promise<void>


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,
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}

0 comments on commit 315cdfc

Please sign in to comment.