@stackflow/plugin-history-sync
Advanced tools
Comparing version 1.3.11-alpha.4 to 1.3.11-alpha.6
/// <reference types="react" /> | ||
declare type HistoryQueueContextValue = { | ||
enqueue: (action: () => void) => void; | ||
export declare type HistoryQueueContextValue = { | ||
enqueue: (action: () => void, listen?: boolean) => void; | ||
}; | ||
@@ -10,2 +10,1 @@ export declare const HistoryQueueContext: import("react").Context<HistoryQueueContextValue>; | ||
export declare const useHistoryQueue: () => HistoryQueueContextValue; | ||
export {}; |
@@ -6,3 +6,3 @@ import type { History } from "history"; | ||
export declare const makeHistoryTaskQueue: (history: History) => { | ||
enqueue: (cb: () => void, listen?: boolean) => void; | ||
enqueue: (action: () => void, listen?: boolean | undefined) => void; | ||
}; |
{ | ||
"name": "@stackflow/plugin-history-sync", | ||
"version": "1.3.11-alpha.4+a9679b1c", | ||
"version": "1.3.11-alpha.6+7f18ac51", | ||
"license": "MIT", | ||
@@ -84,3 +84,3 @@ "exports": { | ||
}, | ||
"gitHead": "a9679b1c249c662f147d20c91aaa8c2f68e0a58d" | ||
"gitHead": "7f18ac513e9826e4a9fafcdd46420cb356ec7f36" | ||
} |
import type { History } from "history"; | ||
import type { HistoryQueueContextValue } from "HistoryQueueContext"; | ||
@@ -9,3 +10,6 @@ /** | ||
const enqueue = (cb: () => void, listen: boolean = true) => { | ||
const enqueue: HistoryQueueContextValue["enqueue"] = ( | ||
cb: () => void, | ||
listen: boolean = true, | ||
) => { | ||
previousTask = previousTask.then( | ||
@@ -12,0 +16,0 @@ () => |
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
166571
3158