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

17 lines
562 B
Text
Raw Normal View History

2014-07-13 01:04:16 +02:00
==== tests/cases/compiler/getAndSetNotIdenticalType.ts (4 errors) ====
class C {
get x(): number {
~
!!! Accessors are only available when targeting ECMAScript 5 and higher.
~~~~~~~~~~~~~~~~~
return 1;
~~~~~~~~~~~~~~~~~
}
~~~~~
!!! 'get' and 'set' accessor must have the same type.
set x(v: string) { }
~
!!! Accessors are only available when targeting ECMAScript 5 and higher.
~~~~~~~~~~~~~~~~~~~~
!!! 'get' and 'set' accessor must have the same type.
}