-
Notifications
You must be signed in to change notification settings - Fork 142
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding types with optional properties made required #109
Comments
@sstarrAtmeta are you still experiencing this pain? Would you like to take a stab at a PR? :) |
@sstarrAtmeta with #114 now merged, you can now define the type by using |
I think this can be closed. type YourAction = RequiredPick<FSA<'ACTION', string>, 'payload'> |
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: