TypeScript/tests/baselines/reference/returnValueInSetter.errors.txt
2014-09-11 16:11:08 -07:00

12 lines
359 B
Plaintext

==== tests/cases/compiler/returnValueInSetter.ts (2 errors) ====
class f {
set x(value) {
~
!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
return null; // Should be an error
~~~~
!!! error TS2408: Setters cannot return a value.
}
}