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

253 lines
15 KiB
Text
Raw Normal View History

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'.
2014-08-07 02:58:03 +02:00
==== 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>;
2014-08-07 02:58:03 +02:00
~~~~~~~~~
!!! error TS4057: Return type of method from exported interface has or is using private name 'privateClass'.
2014-08-07 02:58:03 +02:00
~~~~~~~~~
!!! error TS4057: Return type of method from exported interface has or is using private name 'privateClassT'.
myMethod2(): privateClassT<publicClass>;
2014-08-07 02:58:03 +02:00
~~~~~~~~~
!!! error TS4057: Return type of method from exported interface has or is using private name 'privateClassT'.
myMethod3(): publicClassT<privateClass>;
2014-08-07 02:58:03 +02:00
~~~~~~~~~
!!! 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>;
2014-08-07 02:58:03 +02:00
~~~~~~~~~
!!! error TS4057: Return type of method from exported interface has or is using private name 'privateClass'.
2014-08-07 02:58:03 +02:00
~~~~~~~~~
!!! error TS4057: Return type of method from exported interface has or is using private name 'privateClassT'.
myMethod2(): privateClassT<publicClass>;
2014-08-07 02:58:03 +02:00
~~~~~~~~~
!!! error TS4057: Return type of method from exported interface has or is using private name 'privateClassT'.
myMethod3(): publicClassT<privateClass>;
2014-08-07 02:58:03 +02:00
~~~~~~~~~
!!! 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>;
2014-08-07 02:58:03 +02:00
~~~~~~~~~
!!! error TS4057: Return type of method from exported interface has or is using private name 'privateClassInPublicModule'.
2014-08-07 02:58:03 +02:00
~~~~~~~~~
!!! error TS4057: Return type of method from exported interface has or is using private name 'privateClassInPublicModuleT'.
myMethod2(): privateClassInPublicModuleT<publicClassInPublicModule>;
2014-08-07 02:58:03 +02:00
~~~~~~~~~
!!! error TS4057: Return type of method from exported interface has or is using private name 'privateClassInPublicModuleT'.
myMethod3(): publicClassInPublicModuleT<privateClassInPublicModule>;
2014-08-07 02:58:03 +02:00
~~~~~~~~~
!!! 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>;
2014-08-07 02:58:03 +02:00
~~~~~~~~~
!!! error TS4057: Return type of method from exported interface has or is using private name 'privateClassInPublicModule'.
2014-08-07 02:58:03 +02:00
~~~~~~~~~
!!! error TS4057: Return type of method from exported interface has or is using private name 'privateClassInPublicModuleT'.
myMethod2(): privateClassInPublicModuleT<publicClassInPublicModule>;
2014-08-07 02:58:03 +02:00
~~~~~~~~~
!!! error TS4057: Return type of method from exported interface has or is using private name 'privateClassInPublicModuleT'.
myMethod3(): publicClassInPublicModuleT<privateClassInPublicModule>;
2014-08-07 02:58:03 +02:00
~~~~~~~~~
!!! 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>;
}
}