Comparing version 1.9.1 to 1.9.2
@@ -76,22 +76,22 @@ /** Object types that should never be mapped */ | ||
*/ | ||
<S = any, R = never>( | ||
currentState: S, | ||
recipe: (this: Draft<S>, draft: Draft<S>) => void | R, | ||
<State, Result = any>( | ||
currentState: State, | ||
recipe: (this: Draft<State>, draft: Draft<State>) => Result, | ||
listener?: PatchListener | ||
): R | ||
): void extends Result ? State : Result | ||
/** Curried producer with an initial state */ | ||
<S = any, R = never>( | ||
recipe: (this: Draft<S>, draft: Draft<S>) => void | R, | ||
defaultBase: S | ||
): (base: S | undefined) => R | ||
<State, Result = any>( | ||
recipe: (this: Draft<State>, draft: Draft<State>) => void | Result, | ||
defaultBase: State | ||
): (base: State | undefined) => void extends Result ? State : Result | ||
/** Curried producer with no initial state */ | ||
<S = any, R = never, Args extends any[] = any[]>( | ||
<State, Result = any, Args extends any[] = any[]>( | ||
recipe: ( | ||
this: Draft<S>, | ||
draft: Draft<S>, | ||
this: Draft<State>, | ||
draft: Draft<State>, | ||
...extraArgs: Args | ||
) => void | R | ||
): (base: S, ...extraArgs: Args) => R | ||
) => void | Result | ||
): (base: State, ...extraArgs: Args) => void extends Result ? State : Result | ||
} | ||
@@ -98,0 +98,0 @@ |
{ | ||
"name": "immer", | ||
"version": "1.9.1", | ||
"version": "1.9.2", | ||
"description": "Create your next immutable state by mutating the current one", | ||
@@ -5,0 +5,0 @@ "main": "dist/immer.js", |
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
244414