Skip to content

typescript: unclear how to appease compose's typings when using redux dev tools #1937

@tamird

Description

@tamird

Prior to #1868 it was possible to use https://github.com/zalmoxisus/redux-devtools-extension as we do in CRDB: https://github.com/cockroachdb/cockroach/blob/develop/ui/app/redux/state.ts#L27:L51

After #1868, this produces the following error:

TypeScript [Error] file:///Users/tamird/src/go/src/github.com/cockroachdb/cockroach/ui/app/redux/state.ts:36:3
TypeScript [Error] Type 'Func0<{}, StoreEnhancerStoreCreator<{}>>' cannot be converted to type 'StoreEnhancer<AdminUIState>'.
  Type 'StoreEnhancerStoreCreator<{}>' is not comparable to type 'StoreEnhancerStoreCreator<AdminUIState>'.
    Type 'Store<{}>' is not comparable to type 'Store<AdminUIState>'.
      Type '{}' is not comparable to type 'AdminUIState'.
        Property 'routing' is missing in type '{}'. (TS2352)

I'm not really sure if this is a bug in the typings or if we're doing something wrong in our code, but any help would surely be appreciated.

/cc @aikoven

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions