, :
type Bar = 'One' | 'Two';
function eq(a: Bar, b: Bar): boolean {
return a === b;
}
function foo(b: Bar) : boolean {
// compare b to 'Three'
return eq(b, 'Three');
}
return eq(b, 'Three');
^ string. This type is incompatible with the expected param type of
function eq(a: Bar, b: Bar): boolean {
^ string enum