Closed zakwalters closed 3 months ago
Thanks for reporting this. I have resolved this in v0.2.1.
@matt-oakes I'm seeing a similar issue
Argument of type 'StoreEnhancer | ((...funcs: StoreEnhancer[]) => (...args: unknown[]) => StoreEnhancerStoreCreator<{}, {}>) | ((...args: unknown[]) => StoreEnhancerStoreCreator<{}, {}>)' is not assignable to parameter of type 'StoreEnhancer<{}, {}> | undefined'.
Type '(...funcs: StoreEnhancer[]) => (...args: unknown[]) => StoreEnhancerStoreCreator<{}, {}>' is not assignable to type 'StoreEnhancer<{}, {}>'
This seems to be fixed by changing the signature of the ComposeWithDevtools
diff --git a/node_modules/redux-devtools-expo-dev-plugin/build/devtools.d.ts b/node_modules/redux-devtools-expo-dev-plugin/build/devtools.d.ts
index 7a35a88..e658fd4 100644
--- a/node_modules/redux-devtools-expo-dev-plugin/build/devtools.d.ts
+++ b/node_modules/redux-devtools-expo-dev-plugin/build/devtools.d.ts
@@ -47,5 +47,5 @@ interface Options<S, A extends Action<string>> {
}
declare const _default: <S, A extends Action<string>>(options?: Options<S, A>) => StoreEnhancer;
export default _default;
-export declare function composeWithDevTools(...funcs: [Options<unknown, Action<string>>] | StoreEnhancer[]): StoreEnhancer | ((...funcs: StoreEnhancer[]) => (...args: unknown[]) => StoreEnhancerStoreCreator<{}, {}>) | ((...args: unknown[]) => StoreEnhancerStoreCreator<{}, {}>);
+export declare function composeWithDevTools(...funcs: StoreEnhancer[] | [Options<unknown, Action<string>>]): StoreEnhancer;
//# sourceMappingURL=devtools.d.ts.map
\ No newline at end of file
Edit; i posted a separate issue
When using the recommended setup with
configureStore
from here, there's a TypeScript error:You can see that the comment below has to include
@ts-ignore
to resolve this.Potential Solution
I think it can be fixed by providing a no-op enhancer in non-production environments. I've tested that my
tsc
error goes away if Iyarn link
this version into my app, but I haven't actually run it. Seems like(next) => next
should be the right form of a no-op enhancer though.