11 lines
219 B
TypeScript
11 lines
219 B
TypeScript
interface Real {
|
|
method(this: this, n: number): void;
|
|
data: string;
|
|
}
|
|
interface Fake {
|
|
method(this: this, n: number): void;
|
|
data: number;
|
|
}
|
|
function test(r: Real | Fake) {
|
|
r.method(12);
|
|
}
|