133 lines
No EOL
5.9 KiB
Text
133 lines
No EOL
5.9 KiB
Text
tests/cases/compiler/declFileTypeAnnotationVisibilityErrorAccessors.ts(16,21): error TS4043: Return type of public property getter from exported class has or is using private name 'private1'.
|
|
tests/cases/compiler/declFileTypeAnnotationVisibilityErrorAccessors.ts(21,13): error TS4043: Return type of public property getter from exported class has or is using private name 'private1'.
|
|
tests/cases/compiler/declFileTypeAnnotationVisibilityErrorAccessors.ts(26,25): error TS4037: Parameter 'foo3' of public property setter from exported class has or is using private name 'private1'.
|
|
tests/cases/compiler/declFileTypeAnnotationVisibilityErrorAccessors.ts(33,25): error TS4037: Parameter 'foo4' of public property setter from exported class has or is using private name 'private1'.
|
|
tests/cases/compiler/declFileTypeAnnotationVisibilityErrorAccessors.ts(37,21): error TS4043: Return type of public property getter from exported class has or is using private name 'private1'.
|
|
tests/cases/compiler/declFileTypeAnnotationVisibilityErrorAccessors.ts(72,23): error TS4043: Return type of public property getter from exported class has or is using private name 'm2'.
|
|
tests/cases/compiler/declFileTypeAnnotationVisibilityErrorAccessors.ts(77,13): error TS4042: Return type of public property getter from exported class has or is using name 'm2.public2' from private module 'm2'.
|
|
tests/cases/compiler/declFileTypeAnnotationVisibilityErrorAccessors.ts(82,27): error TS4037: Parameter 'foo113' of public property setter from exported class has or is using private name 'm2'.
|
|
tests/cases/compiler/declFileTypeAnnotationVisibilityErrorAccessors.ts(89,27): error TS4037: Parameter 'foo114' of public property setter from exported class has or is using private name 'm2'.
|
|
tests/cases/compiler/declFileTypeAnnotationVisibilityErrorAccessors.ts(93,23): error TS4043: Return type of public property getter from exported class has or is using private name 'm2'.
|
|
|
|
|
|
==== tests/cases/compiler/declFileTypeAnnotationVisibilityErrorAccessors.ts (10 errors) ====
|
|
|
|
module m {
|
|
class private1 {
|
|
}
|
|
|
|
export class public1 {
|
|
}
|
|
|
|
module m2 {
|
|
export class public2 {
|
|
}
|
|
}
|
|
|
|
export class c {
|
|
// getter with annotation
|
|
get foo1(): private1 {
|
|
~~~~~~~~
|
|
!!! error TS4043: Return type of public property getter from exported class has or is using private name 'private1'.
|
|
return;
|
|
}
|
|
|
|
// getter without annotation
|
|
get foo2() {
|
|
~~~~
|
|
!!! error TS4043: Return type of public property getter from exported class has or is using private name 'private1'.
|
|
return new private1();
|
|
}
|
|
|
|
// setter with annotation
|
|
set foo3(param: private1) {
|
|
~~~~~~~~
|
|
!!! error TS4037: Parameter 'foo3' of public property setter from exported class has or is using private name 'private1'.
|
|
}
|
|
|
|
// Both - getter without annotation, setter with annotation
|
|
get foo4() {
|
|
return new private1();
|
|
}
|
|
set foo4(param: private1) {
|
|
~~~~~~~~
|
|
!!! error TS4037: Parameter 'foo4' of public property setter from exported class has or is using private name 'private1'.
|
|
}
|
|
|
|
// Both - with annotation
|
|
get foo5(): private1 {
|
|
~~~~~~~~
|
|
!!! error TS4043: Return type of public property getter from exported class has or is using private name 'private1'.
|
|
return;
|
|
}
|
|
set foo5(param: private1) {
|
|
}
|
|
|
|
// getter with annotation
|
|
get foo11(): public1 {
|
|
return;
|
|
}
|
|
|
|
// getter without annotation
|
|
get foo12() {
|
|
return new public1();
|
|
}
|
|
|
|
// setter with annotation
|
|
set foo13(param: public1) {
|
|
}
|
|
|
|
// Both - getter without annotation, setter with annotation
|
|
get foo14() {
|
|
return new public1();
|
|
}
|
|
set foo14(param: public1) {
|
|
}
|
|
|
|
// Both - with annotation
|
|
get foo15(): public1 {
|
|
return;
|
|
}
|
|
set foo15(param: public1) {
|
|
}
|
|
|
|
// getter with annotation
|
|
get foo111(): m2.public2 {
|
|
~~
|
|
!!! error TS4043: Return type of public property getter from exported class has or is using private name 'm2'.
|
|
return;
|
|
}
|
|
|
|
// getter without annotation
|
|
get foo112() {
|
|
~~~~~~
|
|
!!! error TS4042: Return type of public property getter from exported class has or is using name 'm2.public2' from private module 'm2'.
|
|
return new m2.public2();
|
|
}
|
|
|
|
// setter with annotation
|
|
set foo113(param: m2.public2) {
|
|
~~
|
|
!!! error TS4037: Parameter 'foo113' of public property setter from exported class has or is using private name 'm2'.
|
|
}
|
|
|
|
// Both - getter without annotation, setter with annotation
|
|
get foo114() {
|
|
return new m2.public2();
|
|
}
|
|
set foo114(param: m2.public2) {
|
|
~~
|
|
!!! error TS4037: Parameter 'foo114' of public property setter from exported class has or is using private name 'm2'.
|
|
}
|
|
|
|
// Both - with annotation
|
|
get foo115(): m2.public2 {
|
|
~~
|
|
!!! error TS4043: Return type of public property getter from exported class has or is using private name 'm2'.
|
|
return;
|
|
}
|
|
set foo115(param: m2.public2) {
|
|
}
|
|
}
|
|
}
|
|
|