4Catalyzer / farce

History repeats itself

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support redux 5

sushantdhiman opened this issue · comments

This library should be updated to support redux@5, I get a few compilation errors

error TS2322: Type 'StoreEnhancer<{ farce: FarceStoreExtension; }>' is not assignable to type 'StoreEnhancer'.
  Types of parameters 'next' and 'next' are incompatible.
    Types of parameters 'reducer' and 'reducer' are incompatible.
      Type 'Reducer<S, A>' is not assignable to type 'Reducer<S, A, PreloadedState<S>>'.
        Types of parameters 'state' and 'state' are incompatible.
          Type 'S | PreloadedState<S> | undefined' is not assignable to type 'S | undefined'.
            Type 'PreloadedState<S>' is not assignable to type 'S | undefined'.
              Type '(S extends CombinedState<infer S1> ? { [K in keyof S1]?: (S1[K] extends object ? PreloadedState<S1[K]> : S1[K]) | undefined; } : S) | { [K in keyof S]: S[K] extends string | ... 2 more ... | symbol ? S[K] : PreloadedState<...>; }' is not assignable to type 'S | undefined'.
                Type 'S extends CombinedState<infer S1> ? { [K in keyof S1]?: (S1[K] extends object ? PreloadedState<S1[K]> : S1[K]) | undefined; } : S' is not assignable to type 'S | undefined'.
                  Type 'S | {}' is not assignable to type 'S | undefined'.
                    Type '{}' is not assignable to type 'S'.
                      'S' could be instantiated with an arbitrary type which could be unrelated to '{}'.

34       createHistoryEnhancer({
         ~~~~~~~~~~~~~~~~~~~~~~~
35         protocol: new MemoryProtocol(BASE_NAME, { persistent: true }),
   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
36         middlewares: [queryMiddleware, basenameMiddleware],
   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
37       }),
   ~~~~~~~~
error TS2322: Type 'StoreEnhancer<{ found: FoundStoreExtension; }>' is not assignable to type 'StoreEnhancer'.
  Types of parameters 'next' and 'next' are incompatible.
    Types of parameters 'reducer' and 'reducer' are incompatible.
      Type 'Reducer<S, A>' is not assignable to type 'Reducer<S, A, PreloadedState<S>>'.

38       createMatchEnhancer(new Matcher(makeRouteConfig(routes))),
         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Closing, as I no longer need this.