feat(codemode): support void and Object.is (#37332)

This commit is contained in:
Aiden Cline
2026-07-16 11:15:29 -05:00
committed by GitHub
parent 7ab8a08efa
commit 60c7f847c1
5 changed files with 41 additions and 3 deletions
@@ -1286,6 +1286,7 @@ export class Interpreter<R> {
return Effect.map(this.evaluateExpression(argument), (value) => {
if (operator === "typeof") return typeofValue(value)
if (operator === "!") return !value
if (operator === "void") return undefined
if (containsOpaqueReference(value)) {
throw new InterpreterRuntimeError("Unary operators require data values in CodeMode.", node, "InvalidDataValue")
}