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

9 lines
No EOL
403 B
Text

==== tests/cases/conformance/parser/ecmascript5/Accessors/parserSetAccessorWithTypeAnnotation1.ts (2 errors) ====
class C {
set foo(v): number {
~~~
!!! A 'set' accessor cannot have a return type annotation.
~~~~~~
!!! A function whose declared type is neither 'void' nor 'any' must return a value or consist of a single 'throw' statement.
}
}