Convert store selectors to Typescript

Closes #3937
This commit is contained in:
Bogdan 2023-07-30 16:23:41 +03:00
parent bc69fa4842
commit db9e62f79d
28 changed files with 188 additions and 125 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;