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

14 lines
No EOL
774 B
Text

tests/cases/conformance/es6/computedProperties/computedPropertyNames35_ES6.ts(4,5): error TS1169: Computed property names are not allowed in interfaces.
tests/cases/conformance/es6/computedProperties/computedPropertyNames35_ES6.ts(4,10): error TS2466: A computed property name cannot reference a type parameter from its containing type.
==== tests/cases/conformance/es6/computedProperties/computedPropertyNames35_ES6.ts (2 errors) ====
function foo<T>() { return '' }
interface I<T> {
bar(): string;
[foo<T>()](): void;
~~~~~~~~~~
!!! error TS1169: Computed property names are not allowed in interfaces.
~
!!! error TS2466: A computed property name cannot reference a type parameter from its containing type.
}