You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Actual behavior:
Compilation error on d initialization (but not on c initialization):
tmp.ts:5:11 - error TS2322: Type 'Pick<Pick<T, Exclude<keyof T, "field">> & { field: string; }, Exclude<Exclude<keyof T, "field">, "field">>' is not assignable to type 'Pick<T, Exclude<keyof T, "field">>'.
Type 'Exclude<keyof T, "field">' is not assignable to type 'Exclude<Exclude<keyof T, "field">, "field">'.
Type 'keyof T' is not assignable to type 'Exclude<keyof T, "field">'.
5 const d: Omit<T, 'field'> = b;
~
Found 1 error.
Related Issues: I did not find other related issues.
The text was updated successfully, but these errors were encountered:
inga-lovinde
changed the title
Exclude<Exclude<keyof T, 'x'>, 'x'> should be assignable to Exclude<keyof T, 'x'>
Exclude<keyof T, 'x'> should be assignable to Exclude<Exclude<keyof T, 'x'>, 'x'>
Apr 3, 2020
TypeScript Version: 3.8.3
Search Terms:
Code
Expected behavior:
Code compiles.
Actual behavior:
Compilation error on
d
initialization (but not onc
initialization):Playground Link: Playground Link
Related Issues: I did not find other related issues.
The text was updated successfully, but these errors were encountered: