mirror of
https://github.com/swc-project/swc.git
synced 2024-12-21 04:32:01 +03:00
14 lines
259 B
TypeScript
14 lines
259 B
TypeScript
interface Pair<T1, T2> { first: T1; second: T2; }
|
|
var x: Pair<string, number>
|
|
var y: { first: string; second: number; }
|
|
|
|
x = y;
|
|
y = x;
|
|
|
|
declare function f<T, U>(x: Pair<T, U>);
|
|
declare function f2<T, U>(x: { first: T; second: U; });
|
|
|
|
f(x);
|
|
f(y);
|
|
f2(x);
|
|
f2(y); |