var C = require('test-lib'); // TODO: spurious error! (replacing C with number makes the error go away) // type Foo = Array | Array; type Foo = Array; // workaround var x:Array = []; var y:Array = []; function foo(x:Foo) {} foo(x); foo(y); // TODO: spurious error! (replacing C with number makes the error go away) // type Bar = (() => C) | (() => string); type Bar = () => (C | string); // workaround function f() { return ""; } function bar(x:Bar) { } bar(f);