swc/crates/swc_ecma_parser/tests/tsc/logicalNotOperatorInvalidOperations.ts

11 lines
171 B
TypeScript
Raw Normal View History

// Unary operator !
var b: number;
// operand before !
var BOOLEAN1 = b!; //expect error
// miss parentheses
var BOOLEAN2 = !b + b;
// miss an operand
var BOOLEAN3 =!;