redux-utilities/flux-standard-action

Adding types with optional properties made required

Open

#109 opened on May 15, 2018

View on GitHub
 (4 comments) (0 reactions) (0 assignees)JavaScript (4,744 stars) (154 forks)batch import
enhancementhelp wanted

Description

Properties payload, error, and meta are all optional properties according to documentation. However I believe there are cases where actions may need to make these properties required ( such as actions based around a text search ). Adding interfaces such as those suggested by @dsanders1234 in a previous issue about these options not being correctly typed as optional strikes me as a good approach, and I'm thinking of doing something similar as a workaround. The standard FluxStandardAction could remain in place while those additional versions could be used as needed.

Contributor guide