use-undoable
Advanced tools
Comparing version 3.3.10 to 3.3.11
declare type ActionType = 'undo' | 'redo' | 'update' | 'reset' | 'resetInitialState'; | ||
declare type HistoryLimit = number | 'infinium' | 'infinity'; | ||
declare type MutationBehavior = 'mergePastReversed' | 'mergePast' | 'destroyFuture' | 'keep future'; | ||
declare type MutationBehavior = 'mergePastReversed' | 'mergePast' | 'destroyFuture' | 'keepFuture'; | ||
interface Action { | ||
@@ -5,0 +5,0 @@ type: ActionType; |
import type { MutationBehavior, Options } from './types'; | ||
declare const useUndoable: <T = any>(initialPresent: T, options?: Options) => [T, (payload: T | ((oldValue: T) => T), behavior?: "mergePastReversed" | "mergePast" | "destroyFuture" | "keep future" | undefined) => void, { | ||
declare const useUndoable: <T = any>(initialPresent: T, options?: Options) => [T, (payload: T | ((oldValue: T) => T), behavior?: "mergePastReversed" | "mergePast" | "destroyFuture" | "keepFuture" | undefined, ignoreAction?: boolean | undefined) => void, { | ||
past: T[]; | ||
@@ -11,4 +11,4 @@ future: T[]; | ||
resetInitialState: (newInitialState: T) => void; | ||
static_setState: (payload: T | ((oldValue: T) => T), behavior?: "mergePastReversed" | "mergePast" | "destroyFuture" | "keep future" | undefined) => void; | ||
static_setState: (payload: T, behavior?: "mergePastReversed" | "mergePast" | "destroyFuture" | "keepFuture" | undefined, ignoreAction?: boolean | undefined) => void; | ||
}]; | ||
export default useUndoable; |
{ | ||
"name": "use-undoable", | ||
"version": "3.3.10", | ||
"version": "3.3.11", | ||
"description": "React hook for undo/redo functionality without the hassle.", | ||
@@ -30,4 +30,4 @@ "private": false, | ||
"npm-run-all": "^4.1.5", | ||
"react": "^17.0.2", | ||
"react-dom": "^17.0.2", | ||
"react": "^18", | ||
"react-dom": "^18", | ||
"react-scripts": "^3.4.1", | ||
@@ -34,0 +34,0 @@ "typescript": "^3.7.5" |
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
68386