1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
|
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', 'bigint' or an enum type.
tests/cases/conformance/es6/Symbols/symbolType3.ts(6,3): error TS2356: An arithmetic operand must be of type 'any', 'number', 'bigint' 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', 'bigint' or an enum type.
--s;
~
!!! error TS2356: An arithmetic operand must be of type 'any', 'number', 'bigint' 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'.
|