Skip to content

Commit

Permalink
[DataGrid] Fix type definitions (#596)
Browse files Browse the repository at this point in the history
  • Loading branch information
tooppaaa authored Nov 16, 2020
1 parent 7baff71 commit e04d2f2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
import { createSelector } from 'reselect';
import { createSelector, OutputSelector } from 'reselect';
import { GridState } from '../core/gridState';
import { SelectionState } from './selectionState';

export const selectionStateSelector = (state: GridState) => state.selection;
export const selectedRowsCountSelector = createSelector<GridState, SelectionState, number>(
export const selectedRowsCountSelector: OutputSelector<
GridState,
number,
(res: SelectionState) => number
> = createSelector<GridState, SelectionState, number>(
selectionStateSelector,
(selection) => Object.keys(selection).length,
);
2 changes: 1 addition & 1 deletion packages/grid/tsconfig.build.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@
"rootDir": "./"
},
"include": ["./data-grid/src", "./x-grid/src", "./_modules_/**/*"],
"exclude": ["__tests__", "**/*.test.ts", "node_modules"]
"exclude": ["__tests__", "**/*.test.*", "node_modules"]
}

0 comments on commit e04d2f2

Please sign in to comment.