TypeScript/tests/baselines/reference/accessorsAreNotContextuallyTyped.errors.txt
2014-07-12 17:30:19 -07:00

18 lines
575 B
Plaintext

==== 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