33 lines
610 B
Text
33 lines
610 B
Text
=== tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesThatDifferOnlyByReturnType3.ts ===
|
|
// Normally it is an error to have multiple overloads with identical signatures in a single type declaration.
|
|
// Here the multiple overloads come from multiple merged declarations.
|
|
|
|
interface I {
|
|
>I : I
|
|
|
|
(x: string): string;
|
|
>x : string
|
|
}
|
|
|
|
interface I {
|
|
>I : I
|
|
|
|
(x: string): number;
|
|
>x : string
|
|
}
|
|
|
|
interface I2<T> {
|
|
>I2 : I2<T>
|
|
>T : T
|
|
|
|
(x: string): string;
|
|
>x : string
|
|
}
|
|
|
|
interface I2<T> {
|
|
>I2 : I2<T>
|
|
>T : T
|
|
|
|
(x: string): number;
|
|
>x : string
|
|
}
|