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
commit 60c7f847c1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 41 additions and 3 deletions

View file

@ -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")
}