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
{{ message }}
Repository navigation
Error message refers to wrong key name after key remapping Β #44220
functionfoo<Textends{[KinkeyofTas `${Extract<K,string>}Oops`]: T[K]}>(x: T){}constx={prop: 123};foo(x);// error!// ~ <-- Argument of type '{ prop: number; }' is not assignable to parameter of type '{ propOops: number; }'.// Property 'prop' is missing in type '{ prop: number; }' but required in type '{ propOops: number; }'. (2345)
π Actual behavior
The last line of the error message says that the property prop is missing in the type { prop: number }, but it's not.
π Expected behavior
The error should probably say
Property 'propOops' is missing in type '{ prop: number; }' but required in type '{ propOops: number; }'.
I guess the error message is using the original key when it should be using the remapped key? π€·ββοΈ
Activity