mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-23 16:48:41 -05:00
Remove mistakenly added test file
Intended for a different PR
This commit is contained in:
@@ -1,21 +0,0 @@
|
||||
interface X {
|
||||
type1: 'x';
|
||||
value: string;
|
||||
}
|
||||
|
||||
interface Y {
|
||||
type2: 'y';
|
||||
value: 'none' | 'done';
|
||||
}
|
||||
|
||||
function foo(bar: X | Y) { }
|
||||
|
||||
foo({
|
||||
type2: 'y',
|
||||
value: 'done',
|
||||
});
|
||||
// you could do this (amybe) by noting that
|
||||
// (1) the argument is a fresh object literal
|
||||
// (2) of X | Y, the object literal is only assignable to Y
|
||||
// - you can do *that* cheaply (ie, symbolically) just by throwing out types
|
||||
// that are missing one of the fields in the object literal
|
||||
Reference in New Issue
Block a user