Comparing version 9.0.1 to 9.0.2
@@ -571,3 +571,3 @@ 'use strict'; | ||
if (!state.modified_) { | ||
// the last check is because we need to be able to distinguish setting a non-existig to undefined (which is a change) | ||
// the last check is because we need to be able to distinguish setting a non-existing to undefined (which is a change) | ||
// from setting an existing property with value undefined to undefined (which is not a change) | ||
@@ -574,0 +574,0 @@ var current = peek(latest(state), prop); // special case, if we assigning the original value to a draft, we can ignore the assignment |
@@ -573,3 +573,3 @@ (function (global, factory) { | ||
if (!state.modified_) { | ||
// the last check is because we need to be able to distinguish setting a non-existig to undefined (which is a change) | ||
// the last check is because we need to be able to distinguish setting a non-existing to undefined (which is a change) | ||
// from setting an existing property with value undefined to undefined (which is not a change) | ||
@@ -576,0 +576,0 @@ var current = peek(latest(state), prop); // special case, if we assigning the original value to a draft, we can ignore the assignment |
@@ -82,7 +82,7 @@ import { Nothing } from "../internal"; | ||
<State, Recipe extends Function>(recipe: Recipe, initialState: State): InferCurriedFromInitialStateAndRecipe<State, Recipe, false>; | ||
/** Promisified dormal producer */ | ||
<Base, D = Draft<Base>>(base: Base, recipe: (draft: D) => Promise<ValidRecipeReturnType<D>>, listener?: PatchListener): Promise<Base>; | ||
/** Normal producer */ | ||
<Base, D = Draft<Base>>(// By using a default inferred D, rather than Draft<Base> in the recipe, we can override it. | ||
base: Base, recipe: (draft: D) => ValidRecipeReturnType<D>, listener?: PatchListener): Base; | ||
/** Promisified dormal producer */ | ||
<Base, D = Draft<Base>>(base: Base, recipe: (draft: D) => Promise<ValidRecipeReturnType<D>>, listener?: PatchListener): Promise<Base>; | ||
} | ||
@@ -89,0 +89,0 @@ /** |
{ | ||
"name": "immer", | ||
"version": "9.0.1", | ||
"version": "9.0.2", | ||
"description": "Create your next immutable state by mutating the current one", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -145,3 +145,3 @@ import { | ||
if (!state.modified_) { | ||
// the last check is because we need to be able to distinguish setting a non-existig to undefined (which is a change) | ||
// the last check is because we need to be able to distinguish setting a non-existing to undefined (which is a change) | ||
// from setting an existing property with value undefined to undefined (which is not a change) | ||
@@ -148,0 +148,0 @@ const current = peek(latest(state), prop) |
@@ -214,2 +214,9 @@ import {Nothing} from "../internal" | ||
/** Normal producer */ | ||
<Base, D = Draft<Base>>( // By using a default inferred D, rather than Draft<Base> in the recipe, we can override it. | ||
base: Base, | ||
recipe: (draft: D) => ValidRecipeReturnType<D>, | ||
listener?: PatchListener | ||
): Base | ||
/** Promisified dormal producer */ | ||
@@ -221,9 +228,2 @@ <Base, D = Draft<Base>>( | ||
): Promise<Base> | ||
/** Normal producer */ | ||
<Base, D = Draft<Base>>( // By using a default inferred D, rather than Draft<Base> in the recipe, we can override it. | ||
base: Base, | ||
recipe: (draft: D) => ValidRecipeReturnType<D>, | ||
listener?: PatchListener | ||
): Base | ||
} | ||
@@ -230,0 +230,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
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
843900