redux-utilities/flux-standard-action

Adding types with optional properties made required

Open

#109 创建于 2018年5月15日

在 GitHub 查看
 (4 评论) (0 反应) (0 负责人)JavaScript (4,744 star) (154 fork)batch import
enhancementhelp wanted

描述

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.

贡献者指南