Closed
Description
Hi,
when declaring my containers props i do something like this:
// In my selector file
const simpleSelector = (state: RootState): string => state.mydata;
const reselectSelector = createSelector([simpleSelector], (selector: string): string => selector);
// In my container file
interface SimpleContainerProps {
simpleSelector: typeof simpleSelector; // this is ok because type is string
reselectSelector: typeof reselectSelector; // this gives problems because type is 'OutputSelector<RootState, string, (selector: string) => string>'
}
This gives me the opportunity to be sure that if I change a selector used by any components on my app, typescript compiler will throw an error. However as you can see from my code's comments I cant use it for selectors created by reselect using createSelector.
Does anyone encountered this problem too?
Metadata
Metadata
Assignees
Labels
No labels