From 19cf2fcd820f56bfd4ea03695f79ba1e430afa4a Mon Sep 17 00:00:00 2001 From: Samual Date: Tue, 7 May 2024 10:51:19 +0100 Subject: [PATCH] add `is_scriptor` and `is_brain` to `CLIContext` as optionally `undefined` --- env.d.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/env.d.ts b/env.d.ts index eda5aa6..8a8bf5c 100644 --- a/env.d.ts +++ b/env.d.ts @@ -770,6 +770,8 @@ type CLIContext = { /** The name of the script that directly called this script, or null if called on the command line or as a * scriptor. */ calling_script: null + is_scriptor?: undefined + is_brain?: undefined } type SubscriptContext = Replace -type ScriptorContext = CLIContext & { /** Whether the script is being run as a scriptor. */ is_scriptor: true } -type BrainContext = CLIContext & { /** Whether the script is being run via a bot brain. */ is_brain: true } +type ScriptorContext = + Replace + +type BrainContext = + Replace + type Context = CLIContext | SubscriptContext | ScriptorContext | BrainContext /** Subscript space that can call FULLSEC scripts. */ declare const $fs: Fullsec -- knotmirror 0.0.1