tests/cases/compiler/privacyTypeParametersOfInterfaceDeclFile.ts(13,59): error TS4004: Type parameter 'T' of exported interface has or is using private name 'privateClass'.
tests/cases/compiler/privacyTypeParametersOfInterfaceDeclFile.ts(16,5): error TS4057: Return type of method from exported interface has or is using private name 'privateClass'.
tests/cases/compiler/privacyTypeParametersOfInterfaceDeclFile.ts(16,5): error TS4057: Return type of method from exported interface has or is using private name 'privateClassT'.
tests/cases/compiler/privacyTypeParametersOfInterfaceDeclFile.ts(17,5): error TS4057: Return type of method from exported interface has or is using private name 'privateClassT'.
tests/cases/compiler/privacyTypeParametersOfInterfaceDeclFile.ts(18,5): error TS4057: Return type of method from exported interface has or is using private name 'privateClass'.
tests/cases/compiler/privacyTypeParametersOfInterfaceDeclFile.ts(25,5): error TS4057: Return type of method from exported interface has or is using private name 'privateClass'.
tests/cases/compiler/privacyTypeParametersOfInterfaceDeclFile.ts(25,5): error TS4057: Return type of method from exported interface has or is using private name 'privateClassT'.
tests/cases/compiler/privacyTypeParametersOfInterfaceDeclFile.ts(26,5): error TS4057: Return type of method from exported interface has or is using private name 'privateClassT'.
tests/cases/compiler/privacyTypeParametersOfInterfaceDeclFile.ts(27,5): error TS4057: Return type of method from exported interface has or is using private name 'privateClass'.
tests/cases/compiler/privacyTypeParametersOfInterfaceDeclFile.ts(60,75): error TS4003: Type parameter 'T' of exported interface has or is using name 'privateModule.publicClassInPrivateModule' from private module 'privateModule'.
tests/cases/compiler/privacyTypeParametersOfInterfaceDeclFile.ts(79,63): error TS4004: Type parameter 'T' of exported interface has or is using private name 'privateClassInPublicModule'.
tests/cases/compiler/privacyTypeParametersOfInterfaceDeclFile.ts(82,9): error TS4057: Return type of method from exported interface has or is using private name 'privateClassInPublicModule'.
tests/cases/compiler/privacyTypeParametersOfInterfaceDeclFile.ts(82,9): error TS4057: Return type of method from exported interface has or is using private name 'privateClassInPublicModuleT'.
tests/cases/compiler/privacyTypeParametersOfInterfaceDeclFile.ts(83,9): error TS4057: Return type of method from exported interface has or is using private name 'privateClassInPublicModuleT'.
tests/cases/compiler/privacyTypeParametersOfInterfaceDeclFile.ts(84,9): error TS4057: Return type of method from exported interface has or is using private name 'privateClassInPublicModule'.
tests/cases/compiler/privacyTypeParametersOfInterfaceDeclFile.ts(91,9): error TS4057: Return type of method from exported interface has or is using private name 'privateClassInPublicModule'.
tests/cases/compiler/privacyTypeParametersOfInterfaceDeclFile.ts(91,9): error TS4057: Return type of method from exported interface has or is using private name 'privateClassInPublicModuleT'.
tests/cases/compiler/privacyTypeParametersOfInterfaceDeclFile.ts(92,9): error TS4057: Return type of method from exported interface has or is using private name 'privateClassInPublicModuleT'.
tests/cases/compiler/privacyTypeParametersOfInterfaceDeclFile.ts(93,9): error TS4057: Return type of method from exported interface has or is using private name 'privateClassInPublicModule'.
tests/cases/compiler/privacyTypeParametersOfInterfaceDeclFile.ts(125,79): error TS4003: Type parameter 'T' of exported interface has or is using name 'privateModule.publicClassInPrivateModule' from private module 'privateModule'.


==== tests/cases/compiler/privacyTypeParametersOfInterfaceDeclFile.ts (20 errors) ====
    class privateClass {
    }
    
    export class publicClass {
    }
    
    class privateClassT<T> {
    }
    
    export class publicClassT<T> {
    }
    
    export interface publicInterfaceWithPrivateTypeParameters<T extends privateClass> { // Error
                                                              ~~~~~~~~~~~~~~~~~~~~~~
!!! error TS4004: Type parameter 'T' of exported interface has or is using private name 'privateClass'.
        myMethod(val: T): T;
        myMethod0(): publicClassT<T>;
        myMethod1(): privateClassT<privateClass>; 
        ~~~~~~~~~
!!! error TS4057: Return type of method from exported interface has or is using private name 'privateClass'.
        ~~~~~~~~~
!!! error TS4057: Return type of method from exported interface has or is using private name 'privateClassT'.
        myMethod2(): privateClassT<publicClass>;
        ~~~~~~~~~
!!! error TS4057: Return type of method from exported interface has or is using private name 'privateClassT'.
        myMethod3(): publicClassT<privateClass>;
        ~~~~~~~~~
!!! error TS4057: Return type of method from exported interface has or is using private name 'privateClass'.
        myMethod4(): publicClassT<publicClass>; 
    }
    
    export interface publicInterfaceWithPublicTypeParameters<T extends publicClass> {
        myMethod(val: T): T;
        myMethod0(): publicClassT<T>
        myMethod1(): privateClassT<privateClass>;
        ~~~~~~~~~
!!! error TS4057: Return type of method from exported interface has or is using private name 'privateClass'.
        ~~~~~~~~~
!!! error TS4057: Return type of method from exported interface has or is using private name 'privateClassT'.
        myMethod2(): privateClassT<publicClass>;
        ~~~~~~~~~
!!! error TS4057: Return type of method from exported interface has or is using private name 'privateClassT'.
        myMethod3(): publicClassT<privateClass>;
        ~~~~~~~~~
!!! error TS4057: Return type of method from exported interface has or is using private name 'privateClass'.
        myMethod4(): publicClassT<publicClass>;
    }
    
    interface privateInterfaceWithPrivateTypeParameters<T extends privateClass> {
        myMethod(val: T): T;
        myMethod0(): publicClassT<T>;
        myMethod1(): privateClassT<privateClass>;
        myMethod2(): privateClassT<publicClass>;
        myMethod3(): publicClassT<privateClass>;
        myMethod4(): publicClassT<publicClass>;
    }
    
    interface privateInterfaceWithPublicTypeParameters<T extends publicClass> {
        myMethod(val: T): T;
        myMethod0(): publicClassT<T>;
        myMethod1(): privateClassT<privateClass>;
        myMethod2(): privateClassT<publicClass>;
        myMethod3(): publicClassT<privateClass>;
        myMethod4(): publicClassT<publicClass>;
    }
    
    export interface publicInterfaceWithPublicTypeParametersWithoutExtends<T> {
        myMethod(val: T): T;
        myMethod0(): publicClassT<T>;
    }
    
    interface privateInterfaceWithPublicTypeParametersWithoutExtends<T> {
        myMethod(val: T): T;
        myMethod0(): publicClassT<T>;
    }
    
    
    export interface publicInterfaceWithPrivateModuleTypeParameterConstraints<T extends privateModule.publicClassInPrivateModule> { // Error
                                                                              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS4003: Type parameter 'T' of exported interface has or is using name 'privateModule.publicClassInPrivateModule' from private module 'privateModule'.
    }
    
    interface privateInterfaceWithPrivateModuleTypeParameterConstraints<T extends privateModule.publicClassInPrivateModule> { // Error
    }
    
    export module publicModule {
        class privateClassInPublicModule {
        }
    
        export class publicClassInPublicModule {
        }
    
        class privateClassInPublicModuleT<T> {
        }
    
        export class publicClassInPublicModuleT<T> {
        }
    
        export interface publicInterfaceWithPrivateTypeParameters<T extends privateClassInPublicModule> { // Error
                                                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS4004: Type parameter 'T' of exported interface has or is using private name 'privateClassInPublicModule'.
            myMethod(val: T): T;
            myMethod0(): publicClassInPublicModuleT<T>;
            myMethod1(): privateClassInPublicModuleT<privateClassInPublicModule>;
            ~~~~~~~~~
!!! error TS4057: Return type of method from exported interface has or is using private name 'privateClassInPublicModule'.
            ~~~~~~~~~
!!! error TS4057: Return type of method from exported interface has or is using private name 'privateClassInPublicModuleT'.
            myMethod2(): privateClassInPublicModuleT<publicClassInPublicModule>;
            ~~~~~~~~~
!!! error TS4057: Return type of method from exported interface has or is using private name 'privateClassInPublicModuleT'.
            myMethod3(): publicClassInPublicModuleT<privateClassInPublicModule>;
            ~~~~~~~~~
!!! error TS4057: Return type of method from exported interface has or is using private name 'privateClassInPublicModule'.
            myMethod4(): publicClassInPublicModuleT<publicClassInPublicModule>;
        }
    
        export interface publicInterfaceWithPublicTypeParameters<T extends publicClassInPublicModule> {
            myMethod(val: T): T;
            myMethod0(): publicClassInPublicModuleT<T>
            myMethod1(): privateClassInPublicModuleT<privateClassInPublicModule>;
            ~~~~~~~~~
!!! error TS4057: Return type of method from exported interface has or is using private name 'privateClassInPublicModule'.
            ~~~~~~~~~
!!! error TS4057: Return type of method from exported interface has or is using private name 'privateClassInPublicModuleT'.
            myMethod2(): privateClassInPublicModuleT<publicClassInPublicModule>;
            ~~~~~~~~~
!!! error TS4057: Return type of method from exported interface has or is using private name 'privateClassInPublicModuleT'.
            myMethod3(): publicClassInPublicModuleT<privateClassInPublicModule>;
            ~~~~~~~~~
!!! error TS4057: Return type of method from exported interface has or is using private name 'privateClassInPublicModule'.
            myMethod4(): publicClassInPublicModuleT<publicClassInPublicModule>;
        }
    
        interface privateInterfaceWithPrivateTypeParameters<T extends privateClassInPublicModule> {
            myMethod(val: T): T;
            myMethod0(): publicClassInPublicModuleT<T>;
            myMethod1(): privateClassInPublicModuleT<privateClassInPublicModule>;
            myMethod2(): privateClassInPublicModuleT<publicClassInPublicModule>;
            myMethod3(): publicClassInPublicModuleT<privateClassInPublicModule>;
            myMethod4(): publicClassInPublicModuleT<publicClassInPublicModule>;
        }
    
        interface privateInterfaceWithPublicTypeParameters<T extends publicClassInPublicModule> {
            myMethod(val: T): T;
            myMethod0(): publicClassInPublicModuleT<T>;
            myMethod1(): privateClassInPublicModuleT<privateClassInPublicModule>;
            myMethod2(): privateClassInPublicModuleT<publicClassInPublicModule>;
            myMethod3(): publicClassInPublicModuleT<privateClassInPublicModule>;
            myMethod4(): publicClassInPublicModuleT<publicClassInPublicModule>;
        }
    
        export interface publicInterfaceWithPublicTypeParametersWithoutExtends<T> {
            myMethod(val: T): T;
            myMethod0(): publicClassInPublicModuleT<T>;
        }
    
        interface privateInterfaceWithPublicTypeParametersWithoutExtends<T> {
            myMethod(val: T): T;
            myMethod0(): publicClassInPublicModuleT<T>;
        }
    
        export interface publicInterfaceWithPrivateModuleTypeParameterConstraints<T extends privateModule.publicClassInPrivateModule> { // Error
                                                                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS4003: Type parameter 'T' of exported interface has or is using name 'privateModule.publicClassInPrivateModule' from private module 'privateModule'.
        }
    
        interface privateInterfaceWithPrivateModuleTypeParameterConstraints<T extends privateModule.publicClassInPrivateModule> { // Error
        }
    }
    
    module privateModule {
        class privateClassInPrivateModule {
        }
    
        export class publicClassInPrivateModule {
        }
    
        class privateClassInPrivateModuleT<T> {
        }
    
        export class publicClassInPrivateModuleT<T> {
        }
    
        export interface publicInterfaceWithPrivateTypeParameters<T extends privateClassInPrivateModule> {
            myMethod(val: T): T;
            myMethod0(): publicClassInPrivateModuleT<T>;
            myMethod1(): privateClassInPrivateModuleT<privateClassInPrivateModule>;
            myMethod2(): privateClassInPrivateModuleT<publicClassInPrivateModule>;
            myMethod3(): publicClassInPrivateModuleT<privateClassInPrivateModule>;
            myMethod4(): publicClassInPrivateModuleT<publicClassInPrivateModule>;
        }
    
        export interface publicInterfaceWithPublicTypeParameters<T extends publicClassInPrivateModule> {
            myMethod(val: T): T;
            myMethod0(): publicClassInPrivateModuleT<T>
            myMethod1(): privateClassInPrivateModuleT<privateClassInPrivateModule>;
            myMethod2(): privateClassInPrivateModuleT<publicClassInPrivateModule>;
            myMethod3(): publicClassInPrivateModuleT<privateClassInPrivateModule>;
            myMethod4(): publicClassInPrivateModuleT<publicClassInPrivateModule>;
        }
    
        interface privateInterfaceWithPrivateTypeParameters<T extends privateClassInPrivateModule> {
            myMethod(val: T): T;
            myMethod0(): publicClassInPrivateModuleT<T>;
            myMethod1(): privateClassInPrivateModuleT<privateClassInPrivateModule>;
            myMethod2(): privateClassInPrivateModuleT<publicClassInPrivateModule>;
            myMethod3(): publicClassInPrivateModuleT<privateClassInPrivateModule>;
            myMethod4(): publicClassInPrivateModuleT<publicClassInPrivateModule>;
        }
    
        interface privateInterfaceWithPublicTypeParameters<T extends publicClassInPrivateModule> {
            myMethod(val: T): T;
            myMethod0(): publicClassInPrivateModuleT<T>;
            myMethod1(): privateClassInPrivateModuleT<privateClassInPrivateModule>;
            myMethod2(): privateClassInPrivateModuleT<publicClassInPrivateModule>;
            myMethod3(): publicClassInPrivateModuleT<privateClassInPrivateModule>;
            myMethod4(): publicClassInPrivateModuleT<publicClassInPrivateModule>;
        }
    
        export interface publicInterfaceWithPublicTypeParametersWithoutExtends<T> {
            myMethod(val: T): T;
            myMethod0(): publicClassInPrivateModuleT<T>;
        }
    
        interface privateInterfaceWithPublicTypeParametersWithoutExtends<T> {
            myMethod(val: T): T;
            myMethod0(): publicClassInPrivateModuleT<T>;
        }
    }