- PickFacet<M, F>(maker, facetName): ((...args: Parameters<M>) => ReturnType<M>[F])
Type Parameters
- M extends ((...args: any[]) => any)
- F extends string | number | symbol
Returns ((...args: Parameters<M>) => ReturnType<M>[F])
- (...args): ReturnType<M>[F]
Parameters
Rest
...args: Parameters<M>
Returns ReturnType<M>[F]
When making a multi-facet kind, it's common to pick one facet to expose. E.g.,
This helper reduces the duplication: