36 lines
1.9 KiB
Plaintext
36 lines
1.9 KiB
Plaintext
tests/cases/conformance/es6/Symbols/symbolType3.ts(2,8): error TS2704: The operand of a delete operator cannot be a read-only property.
|
|
tests/cases/conformance/es6/Symbols/symbolType3.ts(5,3): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type.
|
|
tests/cases/conformance/es6/Symbols/symbolType3.ts(6,3): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type.
|
|
tests/cases/conformance/es6/Symbols/symbolType3.ts(7,3): error TS2469: The '+' operator cannot be applied to type 'symbol'.
|
|
tests/cases/conformance/es6/Symbols/symbolType3.ts(8,3): error TS2469: The '-' operator cannot be applied to type 'symbol'.
|
|
tests/cases/conformance/es6/Symbols/symbolType3.ts(9,3): error TS2469: The '~' operator cannot be applied to type 'symbol'.
|
|
tests/cases/conformance/es6/Symbols/symbolType3.ts(12,2): error TS2469: The '+' operator cannot be applied to type 'symbol'.
|
|
|
|
|
|
==== tests/cases/conformance/es6/Symbols/symbolType3.ts (7 errors) ====
|
|
var s = Symbol();
|
|
delete Symbol.iterator;
|
|
~~~~~~~~~~~~~~~
|
|
!!! error TS2704: The operand of a delete operator cannot be a read-only property.
|
|
void Symbol.toPrimitive;
|
|
typeof Symbol.toStringTag;
|
|
++s;
|
|
~
|
|
!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type.
|
|
--s;
|
|
~
|
|
!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type.
|
|
+ Symbol();
|
|
~~~~~~~~
|
|
!!! error TS2469: The '+' operator cannot be applied to type 'symbol'.
|
|
- Symbol();
|
|
~~~~~~~~
|
|
!!! error TS2469: The '-' operator cannot be applied to type 'symbol'.
|
|
~ Symbol();
|
|
~~~~~~~~
|
|
!!! error TS2469: The '~' operator cannot be applied to type 'symbol'.
|
|
! Symbol();
|
|
|
|
+(Symbol() || 0);
|
|
~~~~~~~~~~~~~~~
|
|
!!! error TS2469: The '+' operator cannot be applied to type 'symbol'. |