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

91 lines
5.7 KiB
Plaintext

tests/cases/compiler/declFileTypeAnnotationVisibilityErrorTypeLiteral.ts(11,12): error TS4025: Exported variable 'x' has or is using private name 'private1'.
tests/cases/compiler/declFileTypeAnnotationVisibilityErrorTypeLiteral.ts(12,12): error TS4025: Exported variable 'x' has or is using private name 'm2'.
tests/cases/compiler/declFileTypeAnnotationVisibilityErrorTypeLiteral.ts(13,13): error TS4025: Exported variable 'x' has or is using private name 'm2'.
tests/cases/compiler/declFileTypeAnnotationVisibilityErrorTypeLiteral.ts(14,19): error TS4025: Exported variable 'x' has or is using private name 'private1'.
tests/cases/compiler/declFileTypeAnnotationVisibilityErrorTypeLiteral.ts(15,22): error TS4025: Exported variable 'x' has or is using private name 'private1'.
tests/cases/compiler/declFileTypeAnnotationVisibilityErrorTypeLiteral.ts(16,22): error TS4025: Exported variable 'x' has or is using private name 'm2'.
tests/cases/compiler/declFileTypeAnnotationVisibilityErrorTypeLiteral.ts(18,16): error TS4024: Exported variable 'x2' has or is using name 'm2.public1' from private module 'm2'.
tests/cases/compiler/declFileTypeAnnotationVisibilityErrorTypeLiteral.ts(18,16): error TS4025: Exported variable 'x2' has or is using private name 'private1'.
tests/cases/compiler/declFileTypeAnnotationVisibilityErrorTypeLiteral.ts(25,16): error TS4024: Exported variable 'x3' has or is using name 'm2.public1' from private module 'm2'.
tests/cases/compiler/declFileTypeAnnotationVisibilityErrorTypeLiteral.ts(25,16): error TS4025: Exported variable 'x3' has or is using private name 'private1'.
tests/cases/compiler/declFileTypeAnnotationVisibilityErrorTypeLiteral.ts(28,23): error TS4025: Exported variable 'y' has or is using private name 'private1'.
tests/cases/compiler/declFileTypeAnnotationVisibilityErrorTypeLiteral.ts(28,36): error TS4025: Exported variable 'y' has or is using private name 'm2'.
tests/cases/compiler/declFileTypeAnnotationVisibilityErrorTypeLiteral.ts(29,16): error TS4024: Exported variable 'y2' has or is using name 'm2.public1' from private module 'm2'.
tests/cases/compiler/declFileTypeAnnotationVisibilityErrorTypeLiteral.ts(29,16): error TS4025: Exported variable 'y2' has or is using private name 'private1'.
tests/cases/compiler/declFileTypeAnnotationVisibilityErrorTypeLiteral.ts(32,27): error TS4025: Exported variable 'z' has or is using private name 'private1'.
tests/cases/compiler/declFileTypeAnnotationVisibilityErrorTypeLiteral.ts(32,40): error TS4025: Exported variable 'z' has or is using private name 'm2'.
tests/cases/compiler/declFileTypeAnnotationVisibilityErrorTypeLiteral.ts(33,16): error TS4024: Exported variable 'z2' has or is using name 'm2.public1' from private module 'm2'.
tests/cases/compiler/declFileTypeAnnotationVisibilityErrorTypeLiteral.ts(33,16): error TS4025: Exported variable 'z2' has or is using private name 'private1'.
==== tests/cases/compiler/declFileTypeAnnotationVisibilityErrorTypeLiteral.ts (18 errors) ====
module m {
class private1 {
}
module m2 {
export class public1 {
}
}
export var x: {
x: private1;
~~~~~~~~
!!! error TS4025: Exported variable 'x' has or is using private name 'private1'.
y: m2.public1;
~~
!!! error TS4025: Exported variable 'x' has or is using private name 'm2'.
(): m2.public1[];
~~
!!! error TS4025: Exported variable 'x' has or is using private name 'm2'.
method(): private1;
~~~~~~~~
!!! error TS4025: Exported variable 'x' has or is using private name 'private1'.
[n: number]: private1;
~~~~~~~~
!!! error TS4025: Exported variable 'x' has or is using private name 'private1'.
[s: string]: m2.public1;
~~
!!! error TS4025: Exported variable 'x' has or is using private name 'm2'.
};
export var x2 = {
~~
!!! error TS4024: Exported variable 'x2' has or is using name 'm2.public1' from private module 'm2'.
~~
!!! error TS4025: Exported variable 'x2' has or is using private name 'private1'.
x: new private1(),
y: new m2.public1(),
method() {
return new private1();
}
};
export var x3 = x;
~~
!!! error TS4024: Exported variable 'x3' has or is using name 'm2.public1' from private module 'm2'.
~~
!!! error TS4025: Exported variable 'x3' has or is using private name 'private1'.
// Function type
export var y: (a: private1) => m2.public1;
~~~~~~~~
!!! error TS4025: Exported variable 'y' has or is using private name 'private1'.
~~
!!! error TS4025: Exported variable 'y' has or is using private name 'm2'.
export var y2 = y;
~~
!!! error TS4024: Exported variable 'y2' has or is using name 'm2.public1' from private module 'm2'.
~~
!!! error TS4025: Exported variable 'y2' has or is using private name 'private1'.
// constructor type
export var z: new (a: private1) => m2.public1;
~~~~~~~~
!!! error TS4025: Exported variable 'z' has or is using private name 'private1'.
~~
!!! error TS4025: Exported variable 'z' has or is using private name 'm2'.
export var z2 = z;
~~
!!! error TS4024: Exported variable 'z2' has or is using name 'm2.public1' from private module 'm2'.
~~
!!! error TS4025: Exported variable 'z2' has or is using private name 'private1'.
}