TypeScript/tests/baselines/reference/accessorsInAmbientContext.errors.txt
2014-09-12 13:35:07 -07:00

45 lines
2.2 KiB
Plaintext

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.
}