mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
28 lines
593 B
TypeScript
28 lines
593 B
TypeScript
//// [tests/cases/conformance/types/objectTypeLiteral/callSignatures/identicalCallSignatures.ts] ////
|
|
|
|
//// [identicalCallSignatures.ts]
|
|
// Each pair of call signatures in these types have a duplicate signature error.
|
|
// Identical call signatures should generate an error.
|
|
interface I {
|
|
(x): number;
|
|
(x: any): number;
|
|
<T>(x: T): T;
|
|
<U>(x: U): U; // error
|
|
}
|
|
|
|
interface I2<T> {
|
|
(x: T): T;
|
|
(x: T): T; // error
|
|
}
|
|
|
|
var a: {
|
|
(x): number;
|
|
(x: any): number;
|
|
<T>(x: T): T;
|
|
<T>(x: T): T; // error
|
|
}
|
|
|
|
//// [identicalCallSignatures.js]
|
|
"use strict";
|
|
var a;
|