@ngxs/store 3.7.4-dev.master-491e38c → 3.7.4-dev.master-65e4a9a

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.
@@ -2682,6 +2682,32 @@
2682
2682
  StoreValidators.stateNameRegex;
2683
2683
  }
2684
2684
 
2685
+ /**
2686
+ * @fileoverview added by tsickle
2687
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2688
+ */
2689
+ /**
2690
+ * All provided or injected tokens must have `\@Injectable` decorator
2691
+ * (previously, injected tokens without `\@Injectable` were allowed
2692
+ * if another decorator was used, e.g. pipes).
2693
+ * @param {?} stateClass
2694
+ * @return {?}
2695
+ */
2696
+ function ensureStateClassIsInjectable(stateClass) {
2697
+ // `ɵprov` is a static property added by the NGCC compiler. It always exists in
2698
+ // AOT mode because this property is added before runtime. If an application is running in
2699
+ // JIT mode then this property can be added by the `@Injectable()` decorator. The `@Injectable()`
2700
+ // decorator has to go after the `@State()` decorator, thus we prevent users from unwanted DI errors.
2701
+ if (core.ɵivyEnabled) {
2702
+ /** @type {?} */
2703
+ /** @nocollapse */ var ngInjectableDef = stateClass.ɵprov;
2704
+ if (!ngInjectableDef) {
2705
+ // Don't warn if Ivy is disabled or `ɵprov` exists on the class
2706
+ console.warn(getUndecoratedStateInIvyWarningMessage(stateClass.name));
2707
+ }
2708
+ }
2709
+ }
2710
+
2685
2711
  /**
2686
2712
  * @fileoverview added by tsickle
2687
2713
  * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
@@ -2876,6 +2902,13 @@
2876
2902
  /** @type {?} */
2877
2903
  var meta = (/** @type {?} */ (stateClass[META_KEY]));
2878
2904
  this.addRuntimeInfoToMeta(meta, path);
2905
+ // Note: previously we called `ensureStateClassIsInjectable` within the
2906
+ // `State` decorator. This check is moved here because the `ɵprov` property
2907
+ // will not exist on the class in JIT mode (because it's set asynchronously
2908
+ // during JIT compilation through `Object.defineProperty`).
2909
+ if (typeof ngDevMode === 'undefined' || ngDevMode) {
2910
+ ensureStateClassIsInjectable(stateClass);
2911
+ }
2879
2912
  /** @type {?} */
2880
2913
  var stateMap = {
2881
2914
  name: name_1,
@@ -4296,32 +4329,6 @@
4296
4329
  });
4297
4330
  }
4298
4331
 
4299
- /**
4300
- * @fileoverview added by tsickle
4301
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
4302
- */
4303
- /**
4304
- * All provided or injected tokens must have `\@Injectable` decorator
4305
- * (previously, injected tokens without `\@Injectable` were allowed
4306
- * if another decorator was used, e.g. pipes).
4307
- * @param {?} target
4308
- * @return {?}
4309
- */
4310
- function ensureStateClassIsInjectable(target) {
4311
- // `ɵprov` is a static property added by the NGCC compiler. It always exists in
4312
- // AOT mode because this property is added before runtime. If an application is running in
4313
- // JIT mode then this property can be added by the `@Injectable()` decorator. The `@Injectable()`
4314
- // decorator has to go after the `@State()` decorator, thus we prevent users from unwanted DI errors.
4315
- if (core.ɵivyEnabled) {
4316
- /** @type {?} */
4317
- /** @nocollapse */ var ngInjectableDef = target.ɵprov;
4318
- if (!ngInjectableDef) {
4319
- // Don't warn if Ivy is disabled or `ɵprov` exists on the class
4320
- console.warn(getUndecoratedStateInIvyWarningMessage(target.name));
4321
- }
4322
- }
4323
- }
4324
-
4325
4332
  /**
4326
4333
  * @fileoverview added by tsickle
4327
4334
  * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
@@ -4383,11 +4390,6 @@
4383
4390
  * @return {?}
4384
4391
  */
4385
4392
  function (target) {
4386
- // Caretaker note: we have still left the `typeof` condition in order to avoid
4387
- // creating a breaking change for projects that still use the View Engine.
4388
- if (typeof ngDevMode === 'undefined' || ngDevMode) {
4389
- ensureStateClassIsInjectable(target);
4390
- }
4391
4393
  /** @type {?} */
4392
4394
  var stateClass = target;
4393
4395
  /** @type {?} */