TypeScript/tests/baselines/reference/callSignaturesThatDifferOnlyByReturnType3.types

34 lines
610 B
Plaintext
Raw Normal View History

2014-08-15 23:33:16 +02:00
=== 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
2014-08-15 23:33:16 +02:00
(x: string): string;
>x : string
2014-08-15 23:33:16 +02:00
}
interface I {
>I : I
2014-08-15 23:33:16 +02:00
(x: string): number;
>x : string
2014-08-15 23:33:16 +02:00
}
interface I2<T> {
>I2 : I2<T>
>T : T
2014-08-15 23:33:16 +02:00
(x: string): string;
>x : string
2014-08-15 23:33:16 +02:00
}
interface I2<T> {
>I2 : I2<T>
>T : T
2014-08-15 23:33:16 +02:00
(x: string): number;
>x : string
2014-08-15 23:33:16 +02:00
}