Closed
Description
Bug Report
const foo = () => "foo";
const bar: () => string = foo as Omit<typeof foo, "baz">;
Type 'Omit<() => string, "baz">' is not assignable to type '() => string'.
Type 'Omit<() => string, "baz">' provides no match for the signature '(): string'.
🔎 Search Terms
() => string
and(): string
- Omit breaks function type match
🙁 Actual behavior
A () => string
has a non-existent property omitted can no longer be assigned to () => string
🙂 Expected behavior
It's the same exact type, nothing has changed by omitting a non-existent property.