File tree Expand file tree Collapse file tree 1 file changed +15
-3
lines changed
Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Original file line number Diff line number Diff line change 1- import { defineActionSymbols , effectSymbols , reducerSymbols } from '../symbols '
1+ import { Observable } from 'rxjs '
22
3+ import { defineActionSymbols , effectSymbols , reducerSymbols } from '../symbols'
4+ import { EffectAction } from '../types'
35import { createActionDecorator } from './action-related'
46
57export * from './action-related'
68
7- export const Reducer = createActionDecorator ( reducerSymbols )
8- export const Effect = createActionDecorator ( effectSymbols )
9+ interface DecoratorReturnType < V > {
10+ ( target : any , propertyKey : string , descriptor : { value ?: V ; get ?( ) : V } ) : void
11+ }
12+
13+ export const Reducer : < S = any > ( ) => DecoratorReturnType <
14+ ( state : S , params ?: any ) => S
15+ > = createActionDecorator ( reducerSymbols )
16+
17+ export const Effect : < A = any , S = any > ( ) => DecoratorReturnType <
18+ ( action : Observable < A > , state$ : Observable < S > ) => Observable < EffectAction >
19+ > = createActionDecorator ( effectSymbols )
20+
921export const DefineAction = createActionDecorator ( defineActionSymbols )
You can’t perform that action at this time.
0 commit comments