Convert store selectors to Typescript

This commit is contained in:
Bogdan
2023-07-30 13:04:17 +03:00
parent efd5e92ca5
commit e51b85449d
30 changed files with 216 additions and 141 deletions

View File

@@ -0,0 +1,11 @@
import { createSelector } from 'reselect';
import { findCommand } from 'Utilities/Command';
import createCommandsSelector from './createCommandsSelector';
function createCommandSelector(name: string, contraints = {}) {
return createSelector(createCommandsSelector(), (commands) => {
return findCommand(commands, { name, ...contraints });
});
}
export default createCommandSelector;