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
Expected behavior:
Expected to compile, since I just created a simple literal object.
Actual behavior:
test.ts(2,9): error TS2322: Type '{ [x: string]: S[keyof S]; }' is not assignable to type '{ [P in keyof S]: S[P]; }'.
Seems that type is removed from key and replaced with string. I'm aware that all object keys are strings, but how do I then create an instance of Pick<S, P>?