@ngxs/store 3.7.4-dev.master-80a3014 → 3.7.4-dev.master-c961545

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -474,8 +474,9 @@
474
474
  * - Object.freeze on the state and actions to guarantee immutability
475
475
  * (default: false)
476
476
  *
477
- * @deprecated This property is no longer necessary when the Ivy compiler is used.
478
- * We'll determine the development mode through the `ngDevMode`. It's still essential with View Engine.
477
+ * Note: this property will be accounted only in development mode when using the Ivy compiler.
478
+ * It makes sense to use it only during development to ensure there're no state mutations.
479
+ * When building for production, the Object.freeze will be tree-shaken away.
479
480
  * @type {?}
480
481
  */
481
482
  NgxsConfig.prototype.developmentMode;
@@ -2346,21 +2347,13 @@
2346
2347
  */
2347
2348
  function (actionOrActions) { return _this._dispatcher.dispatch(actionOrActions); })
2348
2349
  };
2349
- // We have to have that duplication since this will allow us to tree-shake `ensureStateAndActionsAreImmutable`
2350
- // and `deepFreeze` in Ivy production build.
2351
- // The below `if` condition checks 2 things:
2352
- // 1) if we're in View Engine (`ngDevMode` is `undefined`)
2353
- // 2) if we're running tests, we should fallback to `config.developmentMode` to be backwards-compatible
2354
- if (typeof ngDevMode === 'undefined' || (ngDevMode && internals.isAngularInTestMode())) {
2350
+ if (typeof ngDevMode === 'undefined' || ngDevMode) {
2355
2351
  return this._config.developmentMode
2356
2352
  ? ensureStateAndActionsAreImmutable(rootStateOperations)
2357
2353
  : rootStateOperations;
2358
2354
  }
2359
2355
  else {
2360
- // If we're in Ivy and not running tests, then tree-shake `ensureStateAndActionsAreImmutable` and `deepFreeze`.
2361
- return ngDevMode
2362
- ? ensureStateAndActionsAreImmutable(rootStateOperations)
2363
- : rootStateOperations;
2356
+ return rootStateOperations;
2364
2357
  }
2365
2358
  };
2366
2359
  /**