85 lines
No EOL
5 KiB
Text
85 lines
No EOL
5 KiB
Text
tests/cases/compiler/interfaceWithMultipleDeclarations.ts(3,11): error TS2428: All declarations of an interface must have identical type parameters.
|
|
tests/cases/compiler/interfaceWithMultipleDeclarations.ts(5,11): error TS2428: All declarations of an interface must have identical type parameters.
|
|
tests/cases/compiler/interfaceWithMultipleDeclarations.ts(5,17): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
|
tests/cases/compiler/interfaceWithMultipleDeclarations.ts(7,11): error TS2428: All declarations of an interface must have identical type parameters.
|
|
tests/cases/compiler/interfaceWithMultipleDeclarations.ts(9,11): error TS2428: All declarations of an interface must have identical type parameters.
|
|
tests/cases/compiler/interfaceWithMultipleDeclarations.ts(9,17): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
|
tests/cases/compiler/interfaceWithMultipleDeclarations.ts(11,11): error TS2428: All declarations of an interface must have identical type parameters.
|
|
tests/cases/compiler/interfaceWithMultipleDeclarations.ts(16,11): error TS2428: All declarations of an interface must have identical type parameters.
|
|
tests/cases/compiler/interfaceWithMultipleDeclarations.ts(18,11): error TS2428: All declarations of an interface must have identical type parameters.
|
|
tests/cases/compiler/interfaceWithMultipleDeclarations.ts(20,11): error TS2428: All declarations of an interface must have identical type parameters.
|
|
tests/cases/compiler/interfaceWithMultipleDeclarations.ts(22,11): error TS2428: All declarations of an interface must have identical type parameters.
|
|
tests/cases/compiler/interfaceWithMultipleDeclarations.ts(24,11): error TS2428: All declarations of an interface must have identical type parameters.
|
|
tests/cases/compiler/interfaceWithMultipleDeclarations.ts(29,11): error TS2428: All declarations of an interface must have identical type parameters.
|
|
tests/cases/compiler/interfaceWithMultipleDeclarations.ts(34,14): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
|
tests/cases/compiler/interfaceWithMultipleDeclarations.ts(36,14): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
|
|
|
|
|
==== tests/cases/compiler/interfaceWithMultipleDeclarations.ts (15 errors) ====
|
|
interface I1<V> {
|
|
}
|
|
interface I1<S> { // Name mismatch
|
|
~~
|
|
!!! error TS2428: All declarations of an interface must have identical type parameters.
|
|
}
|
|
interface I1<T, U extends T> { // Length mismatch
|
|
~~
|
|
!!! error TS2428: All declarations of an interface must have identical type parameters.
|
|
~~~~~~~~~~~
|
|
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
|
}
|
|
interface I1<V extends string> { // constraint present
|
|
~~
|
|
!!! error TS2428: All declarations of an interface must have identical type parameters.
|
|
}
|
|
interface I1<V, X extends V> { // Length mismatch
|
|
~~
|
|
!!! error TS2428: All declarations of an interface must have identical type parameters.
|
|
~~~~~~~~~~~
|
|
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
|
}
|
|
interface I1 { // Length mismatch
|
|
~~
|
|
!!! error TS2428: All declarations of an interface must have identical type parameters.
|
|
}
|
|
|
|
interface I2<T extends string> {
|
|
}
|
|
interface I2<T extends () => string> { // constraint mismatch
|
|
~~
|
|
!!! error TS2428: All declarations of an interface must have identical type parameters.
|
|
}
|
|
interface I2<T> { // constraint absent
|
|
~~
|
|
!!! error TS2428: All declarations of an interface must have identical type parameters.
|
|
}
|
|
interface I2<U> { // name mismatch
|
|
~~
|
|
!!! error TS2428: All declarations of an interface must have identical type parameters.
|
|
}
|
|
interface I2<X, Y> { // length mismatch
|
|
~~
|
|
!!! error TS2428: All declarations of an interface must have identical type parameters.
|
|
}
|
|
interface I2 { // length mismatch
|
|
~~
|
|
!!! error TS2428: All declarations of an interface must have identical type parameters.
|
|
}
|
|
|
|
interface I3 {
|
|
}
|
|
interface I3<T> { // length mismatch
|
|
~~
|
|
!!! error TS2428: All declarations of an interface must have identical type parameters.
|
|
}
|
|
|
|
class Foo<T> {
|
|
}
|
|
interface I4<T extends Foo<T>> {
|
|
~~~~~~~~~~~~~~~~
|
|
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
|
}
|
|
interface I4<T extends Foo<T>> { // Should not be error
|
|
~~~~~~~~~~~~~~~~
|
|
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
|
} |