13 lines
No EOL
357 B
Text
13 lines
No EOL
357 B
Text
==== tests/cases/compiler/ambientGetters.ts (2 errors) ====
|
|
|
|
declare class A {
|
|
get length() : number;
|
|
~~~~~~
|
|
!!! An accessor cannot be declared in an ambient context.
|
|
}
|
|
|
|
declare class B {
|
|
get length() { return 0; }
|
|
~~~~~~
|
|
!!! An accessor cannot be declared in an ambient context.
|
|
} |