253 lines
15 KiB
Plaintext
253 lines
15 KiB
Plaintext
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<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 'privateClassT'.
|
|
~~~~~~~~~~~~
|
|
!!! error TS4057: Return type of method from exported interface has or is using private name 'privateClass'.
|
|
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 'privateClassT'.
|
|
~~~~~~~~~~~~
|
|
!!! error TS4057: Return type of method from exported interface has or is using private name 'privateClass'.
|
|
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 TS4004: Type parameter 'T' of exported interface has or is using private name '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 'privateClassInPublicModuleT'.
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
!!! error TS4057: Return type of method from exported interface has or is using private name 'privateClassInPublicModule'.
|
|
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 'privateClassInPublicModuleT'.
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
!!! error TS4057: Return type of method from exported interface has or is using private name 'privateClassInPublicModule'.
|
|
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 TS4004: Type parameter 'T' of exported interface has or is using private name '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>;
|
|
}
|
|
} |