From 75d4cf36f11f2a8cc6498dbcd36dce3ec073d0bd Mon Sep 17 00:00:00 2001 From: Willy-JL <49810075+Willy-JL@users.noreply.github.com> Date: Thu, 17 Oct 2024 21:33:09 +0100 Subject: [PATCH] JS: Custom scope param in load() typedef --- applications/system/js_app/types/global.d.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/applications/system/js_app/types/global.d.ts b/applications/system/js_app/types/global.d.ts index 01a8fbcef..14e045a1e 100644 --- a/applications/system/js_app/types/global.d.ts +++ b/applications/system/js_app/types/global.d.ts @@ -50,11 +50,12 @@ declare const __filepath: string; * @brief Reads a JS value from a file * * Reads a file at the specified path, interprets it as a JS value and returns - * said value. + * the last value pushed on the stack. * * @param path The path to the file + * @param scope An object to use as global scope while running this file */ -declare function load(path: string): any; +declare function load(path: string, scope?: object): any; /** * @brief Return 1-byte string whose ASCII code is the integer `n`