You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 @dsanders1234in 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.
The text was updated successfully, but these errors were encountered:
@sstarrAtmeta with #114 now merged, you can now define the type by using FSAWithPayload to require a payload property. Or simply use FSAAuto which will infer whether payload should be required depending on whether you specify a type other than undefined.
I think this can be closed.
btw if you want to look for a more generic solution to this problem, there is a RequiredPick type from type-plus so that you can do:
Properties
payload
,error
, andmeta
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 standardFluxStandardAction
could remain in place while those additional versions could be used as needed.The text was updated successfully, but these errors were encountered: