From 4b8791e329d0160033e0f8a1cccd9efc125db974 Mon Sep 17 00:00:00 2001 From: Olivier Gagnon Date: Wed, 30 Mar 2022 18:59:30 -0400 Subject: [PATCH] Fix toast --- src/NetscriptFunctions.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/NetscriptFunctions.ts b/src/NetscriptFunctions.ts index eb5412572..113d3267a 100644 --- a/src/NetscriptFunctions.ts +++ b/src/NetscriptFunctions.ts @@ -2263,10 +2263,9 @@ export function NetscriptFunctions(workerScript: WorkerScript): NS { updateDynamicRam("alert", getRamCost(Player, "alert")); dialogBoxCreate(message); }, - toast: function (_message: unknown, _variant: unknown = "success", _duration: unknown = 2000): void { + toast: function (_message: unknown, _variant: unknown = "success", duration: any = 2000): void { const message = helper.string("toast", "message", _message); const variant = helper.string("toast", "variant", _variant); - const duration = helper.number("toast", "duration", _duration); updateDynamicRam("toast", getRamCost(Player, "toast")); if (!["success", "info", "warning", "error"].includes(variant)) throw new Error(`variant must be one of "success", "info", "warning", or "error"`);