Skip to content

TypeScript error when using stateSanitizer or actionSanitizer with custom state/action types #1534

Open
@OliverJAsh

Description

@OliverJAsh

Reduced test case:

import { composeWithDevTools } from "@redux-devtools/extension";

type MyState = {
  foo: string;
};

composeWithDevTools({
  // ❌ Error
  stateSanitizer: (state: MyState) => state,
});

type MyAction = {
  type: "foo";
};

composeWithDevTools({
  // ❌ Error
  actionSanitizer: (action: MyAction) => action,
});

I raised a PR to fix this in the old repository: zalmoxisus/redux-devtools-extension#716. If this looks good, I'd be happy raise another PR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions