File tree 2 files changed +10
-8
lines changed
libs/cart-customer/state/src/injection-tokens
2 files changed +10
-8
lines changed Original file line number Diff line number Diff line change 1
- import { InjectionToken } from '@angular/core' ;
2
-
1
+ import { createSingleInjectionToken } from '@daffodil/core' ;
3
2
import { daffTransformErrorToStateError } from '@daffodil/core/state' ;
4
3
5
- /**
6
- * Transforms `DaffError`s into `DaffStateError`s before they are serialized into state.
7
- * Can be used to further refine Daffodil errors into more specific app errors.
8
- */
9
- export const DAFF_CART_CUSTOMER_ERROR_MATCHER = new InjectionToken < typeof daffTransformErrorToStateError > (
4
+ export const {
5
+ /**
6
+ * Transforms `DaffError`s into `DaffStateError`s before they are serialized into state.
7
+ * Can be used to further refine Daffodil errors into more specific app errors.
8
+ */
9
+ token : DAFF_CART_CUSTOMER_ERROR_MATCHER ,
10
+ provider : daffProvideCartCustomerErrorMatcher ,
11
+ } = createSingleInjectionToken < typeof daffTransformErrorToStateError > (
10
12
'DAFF_CART_CUSTOMER_ERROR_MATCHER' ,
11
13
{ factory : ( ) => daffTransformErrorToStateError } ,
12
14
) ;
Original file line number Diff line number Diff line change 1
- export { DAFF_CART_CUSTOMER_ERROR_MATCHER } from './error-matcher.token' ;
1
+ export * from './error-matcher.token' ;
You can’t perform that action at this time.
0 commit comments