18 lines
No EOL
466 B
Text
18 lines
No EOL
466 B
Text
==== tests/cases/compiler/contextualTypingOfAccessors.ts (2 errors) ====
|
|
// not contextually typing accessors
|
|
|
|
var x: {
|
|
foo: (x: number) => number;
|
|
}
|
|
|
|
x = {
|
|
get foo() {
|
|
~~~
|
|
!!! Accessors are only available when targeting ECMAScript 5 and higher.
|
|
return (n)=>n
|
|
},
|
|
set foo(x) {}
|
|
~~~
|
|
!!! Accessors are only available when targeting ECMAScript 5 and higher.
|
|
}
|
|
|