Skip to content

Changing interface to type for ActionCreator<P> in 3.0-beta-2 #70

Closed
@MistyKuu

Description

@MistyKuu

I'm currently using typescript-fsa version 2.5. I'm augmenting ActionCreator interface like this:

declare module "typescript-fsa" {
  export interface ActionCreator<P> {
    type: string;
    payloadType: P;
    match: (action: Fsa.AnyAction) => action is Action<P>;
    (payload: P, meta?: Meta): Action<P>;
  }
}

The reason I'm doing it is that I extended it with payloadType. In 3.0 I'm not able to do that since types in typescript cannot be augmented. Is there any reason why you decided to use type?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions