45 lines
No EOL
2.2 KiB
Text
45 lines
No EOL
2.2 KiB
Text
tests/cases/compiler/accessorsInAmbientContext.ts(4,13): error TS1086: An accessor cannot be declared in an ambient context.
|
|
tests/cases/compiler/accessorsInAmbientContext.ts(5,13): error TS1086: An accessor cannot be declared in an ambient context.
|
|
tests/cases/compiler/accessorsInAmbientContext.ts(7,20): error TS1086: An accessor cannot be declared in an ambient context.
|
|
tests/cases/compiler/accessorsInAmbientContext.ts(8,20): error TS1086: An accessor cannot be declared in an ambient context.
|
|
tests/cases/compiler/accessorsInAmbientContext.ts(13,9): error TS1086: An accessor cannot be declared in an ambient context.
|
|
tests/cases/compiler/accessorsInAmbientContext.ts(14,9): error TS1086: An accessor cannot be declared in an ambient context.
|
|
tests/cases/compiler/accessorsInAmbientContext.ts(16,16): error TS1086: An accessor cannot be declared in an ambient context.
|
|
tests/cases/compiler/accessorsInAmbientContext.ts(17,16): error TS1086: An accessor cannot be declared in an ambient context.
|
|
|
|
|
|
==== tests/cases/compiler/accessorsInAmbientContext.ts (8 errors) ====
|
|
|
|
declare module M {
|
|
class C {
|
|
get X() { return 1; }
|
|
~
|
|
!!! error TS1086: An accessor cannot be declared in an ambient context.
|
|
set X(v) { }
|
|
~
|
|
!!! error TS1086: An accessor cannot be declared in an ambient context.
|
|
|
|
static get Y() { return 1; }
|
|
~
|
|
!!! error TS1086: An accessor cannot be declared in an ambient context.
|
|
static set Y(v) { }
|
|
~
|
|
!!! error TS1086: An accessor cannot be declared in an ambient context.
|
|
}
|
|
}
|
|
|
|
declare class C {
|
|
get X() { return 1; }
|
|
~
|
|
!!! error TS1086: An accessor cannot be declared in an ambient context.
|
|
set X(v) { }
|
|
~
|
|
!!! error TS1086: An accessor cannot be declared in an ambient context.
|
|
|
|
static get Y() { return 1; }
|
|
~
|
|
!!! error TS1086: An accessor cannot be declared in an ambient context.
|
|
static set Y(v) { }
|
|
~
|
|
!!! error TS1086: An accessor cannot be declared in an ambient context.
|
|
} |