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
How can I select just a subset of keys from an object?
Consider this example in an express app. I want to validate the body, params, and query and want to use ts-belt to select just those three from the request. Is there a way to do this with ts-belt? Maybe a unsafeSelectKeys?
I have been thinking about it the last couple of days and I am not sure if it is possible to have the correct typings if the keys exist and unknown if it.
How can I select just a subset of keys from an object?
Consider this example in an express app. I want to validate the
body
,params
, andquery
and want to use ts-belt to select just those three from the request. Is there a way to do this with ts-belt? Maybe aunsafeSelectKeys
?Thanks for the help!
The text was updated successfully, but these errors were encountered: