function foo(x: $All): number { return x.type; } function bar(x: Error & {type:number}): number { return x.type; }