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

45 lines
2.2 KiB
Plaintext
Raw Normal View History

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.
2014-07-13 01:04:16 +02:00
==== 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.
2014-07-13 01:04:16 +02:00
set X(v) { }
~
!!! error TS1086: An accessor cannot be declared in an ambient context.
2014-07-13 01:04:16 +02:00
static get Y() { return 1; }
~
!!! error TS1086: An accessor cannot be declared in an ambient context.
2014-07-13 01:04:16 +02:00
static set Y(v) { }
~
!!! error TS1086: An accessor cannot be declared in an ambient context.
2014-07-13 01:04:16 +02:00
}
}
declare class C {
get X() { return 1; }
~
!!! error TS1086: An accessor cannot be declared in an ambient context.
2014-07-13 01:04:16 +02:00
set X(v) { }
~
!!! error TS1086: An accessor cannot be declared in an ambient context.
2014-07-13 01:04:16 +02:00
static get Y() { return 1; }
~
!!! error TS1086: An accessor cannot be declared in an ambient context.
2014-07-13 01:04:16 +02:00
static set Y(v) { }
~
!!! error TS1086: An accessor cannot be declared in an ambient context.
2014-07-13 01:04:16 +02:00
}