• Robert Knight's avatar
    Specify type of `state` arguments to `createSelector` calls · 7bc88d9c
    Robert Knight authored
    The newest version of the `createSelector` typings require the type of
    the input argument to be determined in order for the whole call to
    typecheck. This commit implements a pattern where:
    
    - A `State` type is added in various store modules, typically defined as
      `typeof initialState`, that defines the state of that store module's
      type.
    - The type of selector function params in `createSelector` calls is
      specified with `@param {State} state` and the return type is inferred
    
    The upside of these changes is that types of selector functions are
    determined much more robustly - previously it was possible to have
    incorrect types specified via JSDoc.
    
    In the process an existing minor bug was determined where an
    `isHighlight` call in `ThreadList` was passed an unexpected type of
    object (the `annotation` property of a `Draft`) for which `isHighlight`
    did not crash but would always return false. I have simply suppressed
    this existing issue for the moment, but it will need to be fixed
    separately.
    7bc88d9c
Name
Last commit
Last update
..
Annotation Loading commit data...
GroupList Loading commit data...
hooks Loading commit data...
test Loading commit data...
AnnotationView.js Loading commit data...
AutocompleteList.js Loading commit data...
Excerpt.js Loading commit data...
FilterSelect.js Loading commit data...
FilterStatus.js Loading commit data...
HelpPanel.js Loading commit data...
HypothesisApp.js Loading commit data...
LaunchErrorPanel.js Loading commit data...
LoggedOutMessage.js Loading commit data...
LoginPromptPanel.js Loading commit data...
MarkdownEditor.js Loading commit data...
MarkdownView.js Loading commit data...
Menu.js Loading commit data...
MenuItem.js Loading commit data...
MenuKeyboardNavigation.js Loading commit data...
MenuSection.js Loading commit data...
ModerationBanner.js Loading commit data...
NotebookFilters.js Loading commit data...
NotebookResultCount.js Loading commit data...
NotebookView.js Loading commit data...
PaginatedThreadList.js Loading commit data...
PaginationNavigation.js Loading commit data...
SearchInput.js Loading commit data...
SelectionTabs.js Loading commit data...
ShareAnnotationsPanel.js Loading commit data...
ShareLinks.js Loading commit data...
SidebarContentError.js Loading commit data...
SidebarPanel.js Loading commit data...
SidebarView.js Loading commit data...
Slider.js Loading commit data...
SortMenu.js Loading commit data...
StreamSearchInput.js Loading commit data...
StreamView.js Loading commit data...
TagEditor.js Loading commit data...
TagList.js Loading commit data...
Thread.js Loading commit data...
ThreadCard.js Loading commit data...
ThreadList.js Loading commit data...
ToastMessages.js Loading commit data...
TopBar.js Loading commit data...
Tutorial.js Loading commit data...
UserMenu.js Loading commit data...
VersionInfo.js Loading commit data...