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

18 lines
575 B
Plaintext
Raw Normal View History

2014-07-13 01:04:16 +02:00
==== tests/cases/conformance/classes/propertyMemberDeclarations/memberAccessorDeclarations/accessorsAreNotContextuallyTyped.ts (2 errors) ====
// accessors are not contextually typed
class C {
set x(v: (a: string) => string) {
~
!!! Accessors are only available when targeting ECMAScript 5 and higher.
}
get x() {
~
!!! Accessors are only available when targeting ECMAScript 5 and higher.
return (x: string) => "";
}
}
var c: C;
var r = c.x(''); // string