Skip to content

Commit

Permalink
docs(visibility): defined notifyCallback symbol
Browse files Browse the repository at this point in the history
  • Loading branch information
mjancarik committed Jun 26, 2018
1 parent c4c74c1 commit 79f953a
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/Visibility.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
import { Circle } from 'infinite-circle';
import RouterEvents from 'ima/router/Events';

/**
* @callback notifyCallback
* @param {Object} payload
* @param {string} payload.type
*/

/**
* Visibility helper.
*/
Expand Down Expand Up @@ -112,6 +118,8 @@ export default class Visibility {

/**
* The visibility helper start checking visibility of registered entries.
*
* @param {notifyCallback}
*/
_listenOnEvents(notify) {
this._dispatcher.listen(RouterEvents.AFTER_HANDLE_ROUTE, notify);
Expand All @@ -121,6 +129,8 @@ export default class Visibility {

/**
* The visibility helper stop checking visibility of registered entries.
*
* @param {notifyCallback}
*/
_unlistenOnEvents(notify) {
this._dispatcher.unlisten(RouterEvents.AFTER_HANDLE_ROUTE, notify);
Expand Down

0 comments on commit 79f953a

Please sign in to comment.