tests/cases/compiler/privacyTypeParametersOfInterfaceDeclFile.ts(13,69): error TS4004: Type parameter 'T' of exported interface has or is using private name 'privateClass'. tests/cases/compiler/privacyTypeParametersOfInterfaceDeclFile.ts(16,18): error TS4057: Return type of method from exported interface has or is using private name 'privateClassT'. tests/cases/compiler/privacyTypeParametersOfInterfaceDeclFile.ts(16,32): error TS4057: Return type of method from exported interface has or is using private name 'privateClass'. tests/cases/compiler/privacyTypeParametersOfInterfaceDeclFile.ts(17,18): error TS4057: Return type of method from exported interface has or is using private name 'privateClassT'. tests/cases/compiler/privacyTypeParametersOfInterfaceDeclFile.ts(18,31): error TS4057: Return type of method from exported interface has or is using private name 'privateClass'. tests/cases/compiler/privacyTypeParametersOfInterfaceDeclFile.ts(25,18): error TS4057: Return type of method from exported interface has or is using private name 'privateClassT'. tests/cases/compiler/privacyTypeParametersOfInterfaceDeclFile.ts(25,32): error TS4057: Return type of method from exported interface has or is using private name 'privateClass'. tests/cases/compiler/privacyTypeParametersOfInterfaceDeclFile.ts(26,18): error TS4057: Return type of method from exported interface has or is using private name 'privateClassT'. tests/cases/compiler/privacyTypeParametersOfInterfaceDeclFile.ts(27,31): error TS4057: Return type of method from exported interface has or is using private name 'privateClass'. tests/cases/compiler/privacyTypeParametersOfInterfaceDeclFile.ts(60,85): error TS4004: Type parameter 'T' of exported interface has or is using private name 'privateModule'. tests/cases/compiler/privacyTypeParametersOfInterfaceDeclFile.ts(79,73): error TS4004: Type parameter 'T' of exported interface has or is using private name 'privateClassInPublicModule'. tests/cases/compiler/privacyTypeParametersOfInterfaceDeclFile.ts(82,22): error TS4057: Return type of method from exported interface has or is using private name 'privateClassInPublicModuleT'. tests/cases/compiler/privacyTypeParametersOfInterfaceDeclFile.ts(82,50): error TS4057: Return type of method from exported interface has or is using private name 'privateClassInPublicModule'. tests/cases/compiler/privacyTypeParametersOfInterfaceDeclFile.ts(83,22): error TS4057: Return type of method from exported interface has or is using private name 'privateClassInPublicModuleT'. tests/cases/compiler/privacyTypeParametersOfInterfaceDeclFile.ts(84,49): error TS4057: Return type of method from exported interface has or is using private name 'privateClassInPublicModule'. tests/cases/compiler/privacyTypeParametersOfInterfaceDeclFile.ts(91,22): error TS4057: Return type of method from exported interface has or is using private name 'privateClassInPublicModuleT'. tests/cases/compiler/privacyTypeParametersOfInterfaceDeclFile.ts(91,50): error TS4057: Return type of method from exported interface has or is using private name 'privateClassInPublicModule'. tests/cases/compiler/privacyTypeParametersOfInterfaceDeclFile.ts(92,22): error TS4057: Return type of method from exported interface has or is using private name 'privateClassInPublicModuleT'. tests/cases/compiler/privacyTypeParametersOfInterfaceDeclFile.ts(93,49): error TS4057: Return type of method from exported interface has or is using private name 'privateClassInPublicModule'. tests/cases/compiler/privacyTypeParametersOfInterfaceDeclFile.ts(125,89): error TS4004: Type parameter 'T' of exported interface has or is using private name 'privateModule'. ==== tests/cases/compiler/privacyTypeParametersOfInterfaceDeclFile.ts (20 errors) ==== class privateClass { } export class publicClass { } class privateClassT { } export class publicClassT { } export interface publicInterfaceWithPrivateTypeParameters { // Error ~~~~~~~~~~~~ !!! error TS4004: Type parameter 'T' of exported interface has or is using private name 'privateClass'. myMethod(val: T): T; myMethod0(): publicClassT; myMethod1(): privateClassT; ~~~~~~~~~~~~~ !!! error TS4057: Return type of method from exported interface has or is using private name 'privateClassT'. ~~~~~~~~~~~~ !!! error TS4057: Return type of method from exported interface has or is using private name 'privateClass'. myMethod2(): privateClassT; ~~~~~~~~~~~~~ !!! error TS4057: Return type of method from exported interface has or is using private name 'privateClassT'. myMethod3(): publicClassT; ~~~~~~~~~~~~ !!! error TS4057: Return type of method from exported interface has or is using private name 'privateClass'. myMethod4(): publicClassT; } export interface publicInterfaceWithPublicTypeParameters { myMethod(val: T): T; myMethod0(): publicClassT myMethod1(): privateClassT; ~~~~~~~~~~~~~ !!! error TS4057: Return type of method from exported interface has or is using private name 'privateClassT'. ~~~~~~~~~~~~ !!! error TS4057: Return type of method from exported interface has or is using private name 'privateClass'. myMethod2(): privateClassT; ~~~~~~~~~~~~~ !!! error TS4057: Return type of method from exported interface has or is using private name 'privateClassT'. myMethod3(): publicClassT; ~~~~~~~~~~~~ !!! error TS4057: Return type of method from exported interface has or is using private name 'privateClass'. myMethod4(): publicClassT; } interface privateInterfaceWithPrivateTypeParameters { myMethod(val: T): T; myMethod0(): publicClassT; myMethod1(): privateClassT; myMethod2(): privateClassT; myMethod3(): publicClassT; myMethod4(): publicClassT; } interface privateInterfaceWithPublicTypeParameters { myMethod(val: T): T; myMethod0(): publicClassT; myMethod1(): privateClassT; myMethod2(): privateClassT; myMethod3(): publicClassT; myMethod4(): publicClassT; } export interface publicInterfaceWithPublicTypeParametersWithoutExtends { myMethod(val: T): T; myMethod0(): publicClassT; } interface privateInterfaceWithPublicTypeParametersWithoutExtends { myMethod(val: T): T; myMethod0(): publicClassT; } export interface publicInterfaceWithPrivateModuleTypeParameterConstraints { // Error ~~~~~~~~~~~~~ !!! error TS4004: Type parameter 'T' of exported interface has or is using private name 'privateModule'. } interface privateInterfaceWithPrivateModuleTypeParameterConstraints { // Error } export module publicModule { class privateClassInPublicModule { } export class publicClassInPublicModule { } class privateClassInPublicModuleT { } export class publicClassInPublicModuleT { } export interface publicInterfaceWithPrivateTypeParameters { // Error ~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS4004: Type parameter 'T' of exported interface has or is using private name 'privateClassInPublicModule'. myMethod(val: T): T; myMethod0(): publicClassInPublicModuleT; myMethod1(): privateClassInPublicModuleT; ~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS4057: Return type of method from exported interface has or is using private name 'privateClassInPublicModuleT'. ~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS4057: Return type of method from exported interface has or is using private name 'privateClassInPublicModule'. myMethod2(): privateClassInPublicModuleT; ~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS4057: Return type of method from exported interface has or is using private name 'privateClassInPublicModuleT'. myMethod3(): publicClassInPublicModuleT; ~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS4057: Return type of method from exported interface has or is using private name 'privateClassInPublicModule'. myMethod4(): publicClassInPublicModuleT; } export interface publicInterfaceWithPublicTypeParameters { myMethod(val: T): T; myMethod0(): publicClassInPublicModuleT myMethod1(): privateClassInPublicModuleT; ~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS4057: Return type of method from exported interface has or is using private name 'privateClassInPublicModuleT'. ~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS4057: Return type of method from exported interface has or is using private name 'privateClassInPublicModule'. myMethod2(): privateClassInPublicModuleT; ~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS4057: Return type of method from exported interface has or is using private name 'privateClassInPublicModuleT'. myMethod3(): publicClassInPublicModuleT; ~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS4057: Return type of method from exported interface has or is using private name 'privateClassInPublicModule'. myMethod4(): publicClassInPublicModuleT; } interface privateInterfaceWithPrivateTypeParameters { myMethod(val: T): T; myMethod0(): publicClassInPublicModuleT; myMethod1(): privateClassInPublicModuleT; myMethod2(): privateClassInPublicModuleT; myMethod3(): publicClassInPublicModuleT; myMethod4(): publicClassInPublicModuleT; } interface privateInterfaceWithPublicTypeParameters { myMethod(val: T): T; myMethod0(): publicClassInPublicModuleT; myMethod1(): privateClassInPublicModuleT; myMethod2(): privateClassInPublicModuleT; myMethod3(): publicClassInPublicModuleT; myMethod4(): publicClassInPublicModuleT; } export interface publicInterfaceWithPublicTypeParametersWithoutExtends { myMethod(val: T): T; myMethod0(): publicClassInPublicModuleT; } interface privateInterfaceWithPublicTypeParametersWithoutExtends { myMethod(val: T): T; myMethod0(): publicClassInPublicModuleT; } export interface publicInterfaceWithPrivateModuleTypeParameterConstraints { // Error ~~~~~~~~~~~~~ !!! error TS4004: Type parameter 'T' of exported interface has or is using private name 'privateModule'. } interface privateInterfaceWithPrivateModuleTypeParameterConstraints { // Error } } module privateModule { class privateClassInPrivateModule { } export class publicClassInPrivateModule { } class privateClassInPrivateModuleT { } export class publicClassInPrivateModuleT { } export interface publicInterfaceWithPrivateTypeParameters { myMethod(val: T): T; myMethod0(): publicClassInPrivateModuleT; myMethod1(): privateClassInPrivateModuleT; myMethod2(): privateClassInPrivateModuleT; myMethod3(): publicClassInPrivateModuleT; myMethod4(): publicClassInPrivateModuleT; } export interface publicInterfaceWithPublicTypeParameters { myMethod(val: T): T; myMethod0(): publicClassInPrivateModuleT myMethod1(): privateClassInPrivateModuleT; myMethod2(): privateClassInPrivateModuleT; myMethod3(): publicClassInPrivateModuleT; myMethod4(): publicClassInPrivateModuleT; } interface privateInterfaceWithPrivateTypeParameters { myMethod(val: T): T; myMethod0(): publicClassInPrivateModuleT; myMethod1(): privateClassInPrivateModuleT; myMethod2(): privateClassInPrivateModuleT; myMethod3(): publicClassInPrivateModuleT; myMethod4(): publicClassInPrivateModuleT; } interface privateInterfaceWithPublicTypeParameters { myMethod(val: T): T; myMethod0(): publicClassInPrivateModuleT; myMethod1(): privateClassInPrivateModuleT; myMethod2(): privateClassInPrivateModuleT; myMethod3(): publicClassInPrivateModuleT; myMethod4(): publicClassInPrivateModuleT; } export interface publicInterfaceWithPublicTypeParametersWithoutExtends { myMethod(val: T): T; myMethod0(): publicClassInPrivateModuleT; } interface privateInterfaceWithPublicTypeParametersWithoutExtends { myMethod(val: T): T; myMethod0(): publicClassInPrivateModuleT; } }