You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
uniqueSymbolReassignment.ts(2,18): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later.
2
+
uniqueSymbolReassignment.ts(7,23): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later.
3
+
uniqueSymbolReassignment.ts(19,26): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later.
4
+
uniqueSymbolReassignment.ts(20,26): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later.
5
+
6
+
7
+
==== uniqueSymbolReassignment.ts (4 errors) ====
8
+
// This is a unique symbol (const + Symbol())
9
+
const mySymbol = Symbol('Symbols.mySymbol');
10
+
~~~~~~
11
+
!!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later.
!!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later.
// Non-unique symbols (regular Symbol() without const)
30
+
const nonUniqueSymbol1 = Symbol('nonUnique1');
31
+
~~~~~~
32
+
!!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later.
33
+
const nonUniqueSymbol2 = Symbol('nonUnique2');
34
+
~~~~~~
35
+
!!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later.
36
+
37
+
// Plain text variables (not symbols at all)
38
+
const normalVar = "not a symbol";
39
+
const symbolName = "this contains symbol but is not one";
0 commit comments