From 454e1807c0c8cb7f82b5abf9601d13b7cf3983b7 Mon Sep 17 00:00:00 2001 From: extremeheat Date: Sat, 11 Jan 2025 06:52:35 -0500 Subject: [PATCH] Fix typing error in loader function 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). --- index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.d.ts b/index.d.ts index c9767e3..09a8cbb 100644 --- a/index.d.ts +++ b/index.d.ts @@ -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;