Files
tsgo/testdata/baselines/reference/submodule/conformance/negateOperatorInvalidOperations.js

30 lines
722 B
TypeScript

//// [tests/cases/conformance/expressions/unaryOperators/negateOperator/negateOperatorInvalidOperations.ts] ////
//// [negateOperatorInvalidOperations.ts]
// Unary operator -
// operand before -
var NUMBER1 = var NUMBER-; //expect error
// invalid expressions
var NUMBER2 = -(null - undefined);
var NUMBER3 = -(null - null);
var NUMBER4 = -(undefined - undefined);
// miss operand
var NUMBER =-;
//// [negateOperatorInvalidOperations.js]
"use strict";
// Unary operator -
// operand before -
var NUMBER1 = ;
var NUMBER;
-; //expect error
// invalid expressions
var NUMBER2 = -(null - undefined);
var NUMBER3 = -(null - null);
var NUMBER4 = -(undefined - undefined);
// miss operand
var NUMBER = -;