TypeScript/tests/baselines/reference/ES5SymbolProperty1.errors.txt

19 lines
No EOL
810 B
Text

tests/cases/conformance/Symbols/ES5SymbolProperty1.ts(7,5): error TS1167: Computed property names are only available when targeting ECMAScript 6 and higher.
tests/cases/conformance/Symbols/ES5SymbolProperty1.ts(7,6): error TS2471: A computed property name of the form 'Symbol.foo' must be of type 'symbol'.
==== tests/cases/conformance/Symbols/ES5SymbolProperty1.ts (2 errors) ====
interface SymbolConstructor {
foo: string;
}
var Symbol: SymbolConstructor;
var obj = {
[Symbol.foo]: 0
~~~~~~~~~~~~
!!! error TS1167: Computed property names are only available when targeting ECMAScript 6 and higher.
~~~~~~~~~~
!!! error TS2471: A computed property name of the form 'Symbol.foo' must be of type 'symbol'.
}
obj[Symbol.foo];