webext-redux
Advanced tools
Comparing version 2.1.5 to 2.1.6
@@ -0,0 +0,0 @@ (function (global, factory) { |
@@ -33,7 +33,7 @@ import * as redux from 'redux'; | ||
/** | ||
* Subscribes a listener function for all state changes | ||
* @param listener A listener function to be called when store state changes | ||
* @return An unsubscribe function which can be called to remove the listener from state updates | ||
*/ | ||
/** | ||
* Subscribes a listener function for all state changes | ||
* @param listener A listener function to be called when store state changes | ||
* @return An unsubscribe function which can be called to remove the listener from state updates | ||
*/ | ||
subscribe(listener: () => void): () => void; | ||
@@ -53,3 +53,3 @@ | ||
/** | ||
@@ -76,2 +76,10 @@ * Stub function to stay consistent with Redux Store API. No-op. | ||
dispatch<A>(data: A): A; | ||
/** | ||
* Interoperability point for observable/reactive libraries. | ||
* @returns {observable} A minimal observable of state changes. | ||
* For more information, see the observable proposal: | ||
* https://github.com/tc39/proposal-observable | ||
*/ | ||
[Symbol.observable](): Observable<S> | ||
} | ||
@@ -98,1 +106,34 @@ | ||
): Store; | ||
/** | ||
* Function to remove listener added by `Store.subscribe()`. | ||
*/ | ||
export interface Unsubscribe { | ||
(): void | ||
} | ||
/** | ||
* A minimal observable of state changes. | ||
* For more information, see the observable proposal: | ||
* https://github.com/tc39/proposal-observable | ||
*/ | ||
export type Observable<T> = { | ||
/** | ||
* The minimal observable subscription method. | ||
* @param {Object} observer Any object that can be used as an observer. | ||
* The observer object should have a `next` method. | ||
* @returns {subscription} An object with an `unsubscribe` method that can | ||
* be used to unsubscribe the observable from the store, and prevent further | ||
* emission of values from the observable. | ||
*/ | ||
subscribe: (observer: Observer<T>) => { unsubscribe: Unsubscribe } | ||
[Symbol.observable](): Observable<T> | ||
} | ||
/** | ||
* An Observer is used to receive data from an Observable, and is supplied as | ||
* an argument to subscribe. | ||
*/ | ||
export type Observer<T> = { | ||
next?(value: T): void | ||
} |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
{ | ||
"name": "webext-redux", | ||
"version": "2.1.5", | ||
"version": "2.1.6", | ||
"description": "A set of utilities for building Redux applications in Web Extensions.", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -0,0 +0,0 @@ # WebExt Redux |
@@ -0,0 +0,0 @@ import nodeResolve from 'rollup-plugin-node-resolve'; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
137441
2832