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

60 lines
2.4 KiB
Plaintext

tests/cases/compiler/declFileTypeAnnotationVisibilityErrorParameterOfFunction.ts(15,34): error TS4078: Parameter 'param' of exported function has or is using private name 'private1'.
tests/cases/compiler/declFileTypeAnnotationVisibilityErrorParameterOfFunction.ts(17,26): error TS4078: Parameter 'param' of exported function has or is using private name 'private1'.
tests/cases/compiler/declFileTypeAnnotationVisibilityErrorParameterOfFunction.ts(40,35): error TS4078: Parameter 'param' of exported function has or is using private name 'm2'.
tests/cases/compiler/declFileTypeAnnotationVisibilityErrorParameterOfFunction.ts(42,28): error TS4077: Parameter 'param' of exported function has or is using name 'm2.public2' from private module 'm2'.
==== tests/cases/compiler/declFileTypeAnnotationVisibilityErrorParameterOfFunction.ts (4 errors) ====
module m {
class private1 {
}
export class public1 {
}
// Directly using names from this module
function foo1(param: private1) {
}
function foo2(param = new private1()) {
}
export function foo3(param : private1) {
~~~~~~~~
!!! error TS4078: Parameter 'param' of exported function has or is using private name 'private1'.
}
export function foo4(param = new private1()) {
~~~~~~~~~~~~~~~~~~~~~~
!!! error TS4078: Parameter 'param' of exported function has or is using private name 'private1'.
}
function foo11(param: public1) {
}
function foo12(param = new public1()) {
}
export function foo13(param: public1) {
}
export function foo14(param = new public1()) {
}
module m2 {
export class public2 {
}
}
function foo111(param: m2.public2) {
}
function foo112(param = new m2.public2()) {
}
export function foo113(param: m2.public2) {
~~
!!! error TS4078: Parameter 'param' of exported function has or is using private name 'm2'.
}
export function foo114(param = new m2.public2()) {
~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS4077: Parameter 'param' of exported function has or is using name 'm2.public2' from private module 'm2'.
}
}