SafetyCheckResult
Defined in: packages/engine/src/engine/ExpressionEngineSafety.ts:32
Whether input passed the safety bounds, and which one it failed.
Properties
Section titled “Properties”error?
Section titled “error?”optional error?: { engineError?: EngineError; error: string; program: BytecodeProgram; tokens: Token[]; value: Value;};Defined in: packages/engine/src/engine/ExpressionEngineSafety.ts:47
error.error (a plain string) exists purely because it’s spread
directly into evaluateExpressionWithDiagnostic()’s own return shape
({value, tokens, program, error?: string, ...}), which deliberately
keeps errors as display strings for the debug/diagnostic pipeline
see that method’s own doc comment. error.engineError is additive
(doesn’t replace the string field, so existing consumers of this
exported type are unaffected): it carries the real EngineError this
check constructed internally, so callers that DO want the original
code/category/expected/found/suggestion (prepareExpression(), not the
diagnostic pipeline) don’t have to reconstruct a generic one from just
the flattened message.
engineError?
Section titled “engineError?”optional engineError?: EngineError;error: string;program
Section titled “program”program: BytecodeProgram;tokens
Section titled “tokens”tokens: Token[];value: Value;passed
Section titled “passed”passed: boolean;Defined in: packages/engine/src/engine/ExpressionEngineSafety.ts:33