2016-03-08 22:05:00 +01:00
|
|
|
interface Real {
|
2016-03-25 23:41:37 +01:00
|
|
|
method(this: this, n: number): void;
|
2016-03-08 22:05:00 +01:00
|
|
|
data: string;
|
|
|
|
}
|
|
|
|
interface Fake {
|
2016-03-25 23:41:37 +01:00
|
|
|
method(this: this, n: number): void;
|
2016-03-08 22:05:00 +01:00
|
|
|
data: number;
|
|
|
|
}
|
|
|
|
function test(r: Real | Fake) {
|
|
|
|
r.method(12);
|
|
|
|
}
|