33 lines
No EOL
1.6 KiB
Text
33 lines
No EOL
1.6 KiB
Text
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 (6 errors) ====
|
|
var s = Symbol();
|
|
delete Symbol.iterator;
|
|
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'. |