-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The evaluation of the Keyof Type Operator produces different results to the Pick built-in tool. #48173
Comments
I donβt see a bug here. The type |
+1 to jcalz; this behaves exactly the same as a step-by-step manual evaluation of the type |
Sorry, I forgot to add the '-?' operator in type Foo. I changed the name attribute to required, why does it still return undefined? |
|
But there is another question: I think the |
If you have a value |
All right, I missed this, thanks. |
Bug Report
π Search Terms
Pick
π Version & Regression Information
v4.5.4
β― Playground Link
Link
π» Code
π Actual behavior
The value evaluated for the name contains undefined
π Expected behavior
[P in Extract<U, keyof T>]: T[P] should not return undefined because Extract only narrows down the range of the keys
The text was updated successfully, but these errors were encountered: