18 lines
685 B
Plaintext
18 lines
685 B
Plaintext
==== tests/cases/compiler/extendedInterfacesWithDuplicateTypeParameters.ts (3 errors) ====
|
|
interface InterfaceWithMultipleTypars<A, A> { // should error
|
|
~
|
|
!!! error TS2300: Duplicate identifier 'A'.
|
|
bar(): void;
|
|
}
|
|
|
|
interface InterfaceWithSomeTypars<B> { // should not error
|
|
bar(): void;
|
|
}
|
|
|
|
interface InterfaceWithSomeTypars<C, C> { // should error
|
|
~~~~~~~~~~~~~~~~~~~~~~~
|
|
!!! error TS2428: All declarations of an interface must have identical type parameters.
|
|
~
|
|
!!! error TS2300: Duplicate identifier 'C'.
|
|
bar2(): void;
|
|
} |