@restart/hooks
Advanced tools
Comparing version 0.2.12 to 0.2.13
@@ -8,2 +8,10 @@ /** | ||
declare function useInterval(fn: () => void, ms: number): void; | ||
/** | ||
* Creates a pasuable `setInterval` that is properly cleaned up when a component unmounted | ||
* | ||
* @param fn an function run on each interval | ||
* @param ms The milliseconds duration of the interval | ||
* @param paused Whether or not the interval is currently running | ||
*/ | ||
declare function useInterval(fn: () => void, ms: number, paused: boolean): void; | ||
export default useInterval; |
@@ -12,9 +12,2 @@ "use strict"; | ||
/** | ||
* Creates a pasuable `setInterval` that is properly cleaned up when a component unmounted | ||
* | ||
* @param fn an function run on each interval | ||
* @param ms The milliseconds duration of the interval | ||
* @param paused Whether or not the interval is currently running | ||
*/ | ||
function useInterval(fn, ms, paused) { | ||
@@ -21,0 +14,0 @@ if (paused === void 0) { |
{ | ||
"name": "@restart/hooks", | ||
"version": "0.2.12", | ||
"version": "0.2.13", | ||
"main": "index.js", | ||
@@ -5,0 +5,0 @@ "types": "index.d.ts", |
@@ -8,2 +8,10 @@ /** | ||
declare function useInterval(fn: () => void, ms: number): void; | ||
/** | ||
* Creates a pasuable `setInterval` that is properly cleaned up when a component unmounted | ||
* | ||
* @param fn an function run on each interval | ||
* @param ms The milliseconds duration of the interval | ||
* @param paused Whether or not the interval is currently running | ||
*/ | ||
declare function useInterval(fn: () => void, ms: number, paused: boolean): void; | ||
export default useInterval; |
@@ -12,9 +12,2 @@ "use strict"; | ||
/** | ||
* Creates a pasuable `setInterval` that is properly cleaned up when a component unmounted | ||
* | ||
* @param fn an function run on each interval | ||
* @param ms The milliseconds duration of the interval | ||
* @param paused Whether or not the interval is currently running | ||
*/ | ||
function useInterval(fn, ms, paused) { | ||
@@ -21,0 +14,0 @@ if (paused === void 0) { |
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
67202
1908