mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
45 lines
2.2 KiB
Plaintext
45 lines
2.2 KiB
Plaintext
deleteOperatorInvalidOperations.ts(5,20): error TS1005: ',' expected.
|
|
deleteOperatorInvalidOperations.ts(5,26): error TS1102: 'delete' cannot be called on an identifier in strict mode.
|
|
deleteOperatorInvalidOperations.ts(5,26): error TS2703: The operand of a 'delete' operator must be a property reference.
|
|
deleteOperatorInvalidOperations.ts(5,27): error TS1109: Expression expected.
|
|
deleteOperatorInvalidOperations.ts(8,22): error TS1102: 'delete' cannot be called on an identifier in strict mode.
|
|
deleteOperatorInvalidOperations.ts(8,22): error TS2703: The operand of a 'delete' operator must be a property reference.
|
|
deleteOperatorInvalidOperations.ts(8,23): error TS1109: Expression expected.
|
|
deleteOperatorInvalidOperations.ts(13,16): error TS1102: 'delete' cannot be called on an identifier in strict mode.
|
|
deleteOperatorInvalidOperations.ts(13,16): error TS2703: The operand of a 'delete' operator must be a property reference.
|
|
|
|
|
|
==== deleteOperatorInvalidOperations.ts (9 errors) ====
|
|
// Unary operator delete
|
|
var ANY;
|
|
|
|
// operand before delete operator
|
|
var BOOLEAN1 = ANY delete ; //expect error
|
|
~~~~~~
|
|
!!! error TS1005: ',' expected.
|
|
|
|
!!! error TS1102: 'delete' cannot be called on an identifier in strict mode.
|
|
|
|
!!! error TS2703: The operand of a 'delete' operator must be a property reference.
|
|
~
|
|
!!! error TS1109: Expression expected.
|
|
|
|
// miss an operand
|
|
var BOOLEAN2 = delete ;
|
|
|
|
!!! error TS1102: 'delete' cannot be called on an identifier in strict mode.
|
|
|
|
!!! error TS2703: The operand of a 'delete' operator must be a property reference.
|
|
~
|
|
!!! error TS1109: Expression expected.
|
|
|
|
// delete global variable s
|
|
class testADelx {
|
|
constructor(public s: () => {}) {
|
|
delete s; //expect error
|
|
~
|
|
!!! error TS1102: 'delete' cannot be called on an identifier in strict mode.
|
|
~
|
|
!!! error TS2703: The operand of a 'delete' operator must be a property reference.
|
|
}
|
|
} |