Files
tsgo/testdata/baselines/reference/submodule/conformance/genericAndNonGenericInterfaceWithTheSameName.errors.txt

64 lines
2.2 KiB
Plaintext

genericAndNonGenericInterfaceWithTheSameName.ts(3,11): error TS2428: All declarations of 'A' must have identical type parameters.
genericAndNonGenericInterfaceWithTheSameName.ts(7,11): error TS2428: All declarations of 'A' must have identical type parameters.
genericAndNonGenericInterfaceWithTheSameName.ts(12,15): error TS2428: All declarations of 'A' must have identical type parameters.
genericAndNonGenericInterfaceWithTheSameName.ts(16,15): error TS2428: All declarations of 'A' must have identical type parameters.
genericAndNonGenericInterfaceWithTheSameName.ts(34,22): error TS2428: All declarations of 'A' must have identical type parameters.
genericAndNonGenericInterfaceWithTheSameName.ts(40,22): error TS2428: All declarations of 'A' must have identical type parameters.
==== genericAndNonGenericInterfaceWithTheSameName.ts (6 errors) ====
// generic and non-generic interfaces with the same name do not merge
interface A {
~
!!! error TS2428: All declarations of 'A' must have identical type parameters.
foo: string;
}
interface A<T> { // error
~
!!! error TS2428: All declarations of 'A' must have identical type parameters.
bar: T;
}
namespace M {
interface A<T> {
~
!!! error TS2428: All declarations of 'A' must have identical type parameters.
bar: T;
}
interface A { // error
~
!!! error TS2428: All declarations of 'A' must have identical type parameters.
foo: string;
}
}
namespace M2 {
interface A {
foo: string;
}
}
namespace M2 {
interface A<T> { // ok, different declaration space than other M2
bar: T;
}
}
namespace M3 {
export interface A {
~
!!! error TS2428: All declarations of 'A' must have identical type parameters.
foo: string;
}
}
namespace M3 {
export interface A<T> { // error
~
!!! error TS2428: All declarations of 'A' must have identical type parameters.
bar: T;
}
}