Commit 7990507f authored by Robert Knight's avatar Robert Knight

Fix a type checking error related to `getFilterValues`

Fix a typechecking error in `useRootThread`.

`@return` has no effect when used above a variable initialized to a
value that is not an arrow function or function expression. Therefore
the type was inferred based on the `filterValues` local variable to be
`{}`. Correct this to `Object.<string,string>` so that it matches up
with the `ThreadState` type.
parent 987bcfa5
......@@ -250,12 +250,11 @@ function getFilter(state, filterName) {
/**
* Retrieve the (string) values of all currently-applied filters.
*
* @return {Object<string,string>}
*/
const getFilterValues = createSelector(
state => getFilters(state),
allFilters => {
/** @type {Object.<string,string>} */
const filterValues = {};
Object.keys(allFilters).forEach(
filterKey => (filterValues[filterKey] = allFilters[filterKey].value)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment