File tree Expand file tree Collapse file tree 6 files changed +40
-0
lines changed Expand file tree Collapse file tree 6 files changed +40
-0
lines changed Original file line number Diff line number Diff line change @@ -22618,6 +22618,10 @@ const IS_DIRECT_RENDER = Symbol('is direct render')
22618
22618
const RENDER_RESULT = Symbol('render result')
22619
22619
22620
22620
function easyStateHOC (WrappedComp) {
22621
+ if (typeof WrappedComp !== 'function') {
22622
+ throw new TypeError('easyComp expects a class component as argument.')
22623
+ }
22624
+
22621
22625
return class EasyStateWrapper extends WrappedComp {
22622
22626
constructor (props) {
22623
22627
super(props)
@@ -22679,6 +22683,10 @@ function easyStateHOC (WrappedComp) {
22679
22683
22680
22684
22681
22685
function easyStore (store) {
22686
+ if (typeof store !== 'object') {
22687
+ throw new TypeError('easyStore expects an object as argument.')
22688
+ }
22689
+
22682
22690
const observableStore = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__nx_js_observer_util__["a" /* observable */])(store)
22683
22691
__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__autoBind__["a" /* default */])(observableStore, store, false)
22684
22692
return observableStore
Original file line number Diff line number Diff line change @@ -22618,6 +22618,10 @@ const IS_DIRECT_RENDER = Symbol('is direct render')
22618
22618
const RENDER_RESULT = Symbol('render result')
22619
22619
22620
22620
function easyStateHOC (WrappedComp) {
22621
+ if (typeof WrappedComp !== 'function') {
22622
+ throw new TypeError('easyComp expects a class component as argument.')
22623
+ }
22624
+
22621
22625
return class EasyStateWrapper extends WrappedComp {
22622
22626
constructor (props) {
22623
22627
super(props)
@@ -22679,6 +22683,10 @@ function easyStateHOC (WrappedComp) {
22679
22683
22680
22684
22681
22685
function easyStore (store) {
22686
+ if (typeof store !== 'object') {
22687
+ throw new TypeError('easyStore expects an object as argument.')
22688
+ }
22689
+
22682
22690
const observableStore = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__nx_js_observer_util__["a" /* observable */])(store)
22683
22691
__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__autoBind__["a" /* default */])(observableStore, store, false)
22684
22692
return observableStore
Original file line number Diff line number Diff line change @@ -22618,6 +22618,10 @@ const IS_DIRECT_RENDER = Symbol('is direct render')
22618
22618
const RENDER_RESULT = Symbol('render result')
22619
22619
22620
22620
function easyStateHOC (WrappedComp) {
22621
+ if (typeof WrappedComp !== 'function') {
22622
+ throw new TypeError('easyComp expects a class component as argument.')
22623
+ }
22624
+
22621
22625
return class EasyStateWrapper extends WrappedComp {
22622
22626
constructor (props) {
22623
22627
super(props)
@@ -22679,6 +22683,10 @@ function easyStateHOC (WrappedComp) {
22679
22683
22680
22684
22681
22685
function easyStore (store) {
22686
+ if (typeof store !== 'object') {
22687
+ throw new TypeError('easyStore expects an object as argument.')
22688
+ }
22689
+
22682
22690
const observableStore = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__nx_js_observer_util__["a" /* observable */])(store)
22683
22691
__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__autoBind__["a" /* default */])(observableStore, store, false)
22684
22692
return observableStore
Original file line number Diff line number Diff line change @@ -22762,6 +22762,10 @@ const IS_DIRECT_RENDER = Symbol('is direct render')
22762
22762
const RENDER_RESULT = Symbol('render result')
22763
22763
22764
22764
function easyStateHOC (WrappedComp) {
22765
+ if (typeof WrappedComp !== 'function') {
22766
+ throw new TypeError('easyComp expects a class component as argument.')
22767
+ }
22768
+
22765
22769
return class EasyStateWrapper extends WrappedComp {
22766
22770
constructor (props) {
22767
22771
super(props)
@@ -22823,6 +22827,10 @@ function easyStateHOC (WrappedComp) {
22823
22827
22824
22828
22825
22829
function easyStore (store) {
22830
+ if (typeof store !== 'object') {
22831
+ throw new TypeError('easyStore expects an object as argument.')
22832
+ }
22833
+
22826
22834
const observableStore = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__nx_js_observer_util__["a" /* observable */])(store)
22827
22835
__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__autoBind__["a" /* default */])(observableStore, store, false)
22828
22836
return observableStore
Original file line number Diff line number Diff line change @@ -6,6 +6,10 @@ const IS_DIRECT_RENDER = Symbol('is direct render')
6
6
const RENDER_RESULT = Symbol ( 'render result' )
7
7
8
8
export default function easyStateHOC ( WrappedComp ) {
9
+ if ( typeof WrappedComp !== 'function' ) {
10
+ throw new TypeError ( 'easyComp expects a class component as argument.' )
11
+ }
12
+
9
13
return class EasyStateWrapper extends WrappedComp {
10
14
constructor ( props ) {
11
15
super ( props )
Original file line number Diff line number Diff line change @@ -2,6 +2,10 @@ import { observable } from '@nx-js/observer-util'
2
2
import autoBind from './autoBind'
3
3
4
4
export default function easyStore ( store ) {
5
+ if ( typeof store !== 'object' ) {
6
+ throw new TypeError ( 'easyStore expects an object as argument.' )
7
+ }
8
+
5
9
const observableStore = observable ( store )
6
10
autoBind ( observableStore , store , false )
7
11
return observableStore
You can’t perform that action at this time.
0 commit comments