@@ -8,12 +8,13 @@ const STORE_KEY = '$STORE';
8
8
const ACTIONS_KEY = '$ACTIONS' ;
9
9
10
10
export function Store ( initialState : any = { } ) {
11
- return ( target : any ) =>
11
+ return function ( target : any ) {
12
12
Reflect . defineMetadata ( STORE_KEY , initialState , target ) ;
13
+ }
13
14
}
14
15
15
16
export function Action ( ...klasses : any [ ] ) {
16
- return ( target : any , name : string , descriptor : TypedPropertyDescriptor < any > ) => {
17
+ return function ( target : any , name : string , descriptor : TypedPropertyDescriptor < any > ) {
17
18
const meta = Reflect . getMetadata ( ACTIONS_KEY , target ) || [ ] ;
18
19
for ( const klass of klasses ) {
19
20
const inst = new klass ( ) ;
@@ -32,7 +33,7 @@ export function createReducer(klass: any) {
32
33
const actions = Reflect . getMetadata ( ACTIONS_KEY , klass . prototype ) ;
33
34
const instance = new klass ( ) ;
34
35
35
- return ( state : any = initialState , action : any ) => {
36
+ return function ( state : any = initialState , action : any ) {
36
37
if ( actions ) {
37
38
const meta = actions . find ( a => a . type === action . type ) ;
38
39
if ( meta ) {
@@ -52,7 +53,7 @@ export function createReducer(klass: any) {
52
53
} ;
53
54
}
54
55
55
- export function ofAction < T extends Action > ( ...allowedTypes : any [ ] ) {
56
+ export function ofAction < T extends Action > ( ...allowedTypes : any [ ] ) {
56
57
return function ofTypeOperator ( source$ : Actions < T > ) : Actions < T > {
57
58
return filter . call ( source$ , ( action : any ) => {
58
59
return allowedTypes . some ( a => {
0 commit comments