Skip to content

Commit

Permalink
Improve keybind types
Browse files Browse the repository at this point in the history
  • Loading branch information
MrZillaGold committed Mar 27, 2021
1 parent accd9d5 commit 0e85da2
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "rawjsonbuilder",
"version": "1.1.10",
"version": "1.1.11",
"description": "Minecraft Raw JSON text builder",
"main": "./lib/RawJSONBuilder.js",
"types": "./lib/interfaces.d.ts",
Expand Down
8 changes: 7 additions & 1 deletion src/RawJSONBuilder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,13 @@ export class RawJSONBuilder {
return this;
}

setKeybind(keybind: IKeybind): this {
setKeybind(keybind: IKeybind | string): this {
if (typeof keybind === "string") {
keybind = {
keybind
};
}

this.message = keybind;

return this;
Expand Down

0 comments on commit 0e85da2

Please sign in to comment.