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
1007: Remove unecessary type complexity on searchParameters r=bidoubiwa a=bidoubiwa
This level of type complexity was not maintainable and not exhaustive as it would require a lot of work to make it consistent around the whole codebase.
It also made the usage of the library to limiting in projects that would want different degrees of severity
Co-authored-by: Charlotte Vermandel <[email protected]>
: P['attributesToRetrieve']extendsArray<infer K>// if P['attributesToRetrieve'] is an array, we use `infer K` to extract the keys in the array in place
102
-
? Array<Hit<Pick<T,Exclude<keyofT,Exclude<keyofT,K>>>>>// Same extraction method as above when we have a single `attributesToRetrieve`
103
-
: Array<Hit<T>>// Finally return the full type as `attributesToRetrieve` is neither a single key nor an array of keys
104
-
105
-
// The second generic P is used to capture the SearchParams type
0 commit comments