Skip to content

Commit

Permalink
feat(connector): jsDoc updates
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexandre Stanislawski committed Mar 24, 2017
1 parent 961348a commit c924043
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 12 deletions.
8 changes: 4 additions & 4 deletions src/connectors/hits/connectHits.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@ Full documentation available at https://community.algolia.com/instantsearch.js/c

/**
* @typedef HitsRenderingOptions
* @property {Object[]} hits
* @property {Object} results
* @property {InstantSearch} instantSearchInstance
* @property {Object[]} hits the hits contained in the last results from Algolia
* @property {Object} results the complete results from Algolia
* @property {InstantSearch} instantSearchInstance the instance of instantsearch on which the widget is attached
* @property {Object} widgetParams all original options forwarded to rendering
*/

/**
* Connects a rendering function with the hits business logic.
* @param {function(HitsRenderingOptions)} renderFn function that renders the hits widget
* @param {function(HitsRenderingOptions, boolean)} renderFn function that renders the hits widget
* @return {function(CustomHitsWidgetOptions)} a widget factory for hits widget
*/
export default function connectHits(renderFn) {
Expand Down
13 changes: 7 additions & 6 deletions src/connectors/infinite-hits/connectInfiniteHits.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,17 @@ Full documentation available at https://community.algolia.com/instantsearch.js/c

/**
* @typedef {Object} InfiniteHitsRenderingOptions
* @property {Array} hits
* @property {Object} results
* @property {function} showMore
* @property {boolean} isLastPage
* @property {InstantSearch} instantSearchInstance
* @property {Array} hits the aggregated hits of all the pages
* @property {Object} results the last results
* @property {function} showMore adds a new page and search
* @property {boolean} isLastPage true if the last page has been reached
* @property {InstantSearch} instantSearchInstance the instance of instantsearch on which the widget is attached
* @property {Object} widgetParams all original options forwarded to rendering
*/

/**
* Connects a rendering function with the infinite hits business logic.
* @param {function(InfiniteHitsRenderingOptions)} renderFn function that renders the infinite hits widget
* @param {function(InfiniteHitsRenderingOptions, boolean)} renderFn function that renders the infinite hits widget
* @return {function(CustomInfiniteHitsWidgetOptions)} a widget factory for infinite hits widget
*/
export default function connectInfiniteHits(renderFn) {
Expand Down
2 changes: 1 addition & 1 deletion src/connectors/menu/connectMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Full documentation available at https://community.algolia.com/instantsearch.js/c

/**
* Connects a rendering function with the menu business logic.
* @param {function(MenuRenderingOptions)} renderFn function that renders the menu widget
* @param {function(MenuRenderingOptions, boolean)} renderFn function that renders the menu widget
* @return {function(CustomMenuWidgetOptions)} a widget factory for menu widget
*/
export default function connectMenu(renderFn) {
Expand Down
2 changes: 1 addition & 1 deletion src/connectors/range-slider/connectRangeSlider.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Full documentation available at https://community.algolia.com/instantsearch.js/c

/**
* Connects a rendering function with the range slider business logic.
* @param {function(RangeSliderRenderingOptions)} renderFn function that renders the range slider widget
* @param {function(RangeSliderRenderingOptions, boolean)} renderFn function that renders the range slider widget
* @return {function(CustomRangeSliderWidgetOptions)} a widget factory for range slider widget
*/
export default function connectRangeSlider(renderFn) {
Expand Down

0 comments on commit c924043

Please sign in to comment.