Skip to content

Commit

Permalink
Fix typing error in loader function
Browse files Browse the repository at this point in the history
Fixes #111

Update the `loader` function in `index.d.ts` to accept either a string `mcVersion` or a `bot.registry` object.

* Modify the TypeScript definition to reflect the possible `bot.registry` parameter.

---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/PrismarineJS/prismarine-item/issues/111?shareId=XXXX-XXXX-XXXX-XXXX).
  • Loading branch information
extremeheat committed Jan 11, 2025
1 parent 9b6c8d3 commit 454e180
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@ export class Item {
static nextStackId(): number;
}

export default function loader(mcVersion: string): typeof Item;
export default function loader(mcVersion: string | object): typeof Item;

0 comments on commit 454e180

Please sign in to comment.