feat(codemode): support void and Object.is (#37332)
This commit is contained in:
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")
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue