3d09010dc8
* Intersect this types in union signatures * Actually update baselines
12 lines
228 B
TypeScript
12 lines
228 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); // error
|
|
}
|