From d818ef151ca65008e5c6bb5e92b709decb3026d8 Mon Sep 17 00:00:00 2001 From: bobzel Date: Mon, 14 Apr 2025 18:35:49 -0400 Subject: fixed how templates are expanded to avoid template sub-component conflicts by changing how field keys are named. fixed various Cast functions to be more typesafe by including undefined as part of return type. overhaul of Doc.MakeClone, MakeCopy, FindRefernces - makeClone is no longer async. fixed inlined docs in text docs. --- src/debug/Repl.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/debug') diff --git a/src/debug/Repl.tsx b/src/debug/Repl.tsx index 8ac502348..37586fcc0 100644 --- a/src/debug/Repl.tsx +++ b/src/debug/Repl.tsx @@ -13,7 +13,7 @@ import { makeInterface } from '../fields/Schema'; class Repl extends React.Component { @observable text: string = ''; - @observable executedCommands: { command: string; result: any }[] = []; + @observable executedCommands: { command: string; result: unknown }[] = []; onChange = (e: React.ChangeEvent) => { this.text = e.target.value; @@ -30,7 +30,7 @@ class Repl extends React.Component { if (!script.compiled) { this.executedCommands.push({ command: this.text, result: 'Compile Error' }); } else { - const result = script.run({ makeInterface }, err => this.executedCommands.push({ command: this.text, result: err.message || err })); + const result = script.run({ makeInterface }, err => this.executedCommands.push({ command: this.text, result: err })); result.success && this.executedCommands.push({ command: this.text, result: result.result }); } this.text = ''; @@ -40,7 +40,7 @@ class Repl extends React.Component { @computed get commands() { return this.executedCommands.map(command => ( -
+

{command.command}

{/*
{JSON.stringify(command.result, null, 2)}
*/}
{command.result instanceof RefField || command.result instanceof ObjectField ? 'object' : String(command.result)}
-- cgit v1.2.3-70-g09d2