mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-30 01:04:49 -05:00
Union this-types of unioned call signatures
And and tests and baselines
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
// @strictThis: true
|
||||
interface Real {
|
||||
method(n: number): void;
|
||||
data: string;
|
||||
}
|
||||
interface Fake {
|
||||
method(n: number): void;
|
||||
data: number;
|
||||
}
|
||||
function test(r: Real | Fake) {
|
||||
r.method(12);
|
||||
}
|
||||
Reference in New Issue
Block a user