Skip to content
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

Optional payload/meta properties #100

Closed
rplotkin opened this issue Jan 17, 2018 · 4 comments
Closed

Optional payload/meta properties #100

rplotkin opened this issue Jan 17, 2018 · 4 comments

Comments

@rplotkin
Copy link

payload: Payload
and
meta: Meta
are not defined as optional properties (with "?")
yet they are supposed to be optional. I have not been able to get this to work without explicitly null values; is there a way to have an action with only a type, or are these fields not optional?

@JaKXz
Copy link
Contributor

JaKXz commented Jan 17, 2018

Thank you for the issue! I just merged #94 and perhaps we need something similar for payload.

@dsanders1234
Copy link

dsanders1234 commented May 1, 2018

The problem is that this "standard action" format does not lend itself to typescript very well. In reality, one should have an interface for each type of action:

ActionWithPayload<P> extends Action
ActionWithMeta<M> extends Action
ActionWithPayloadAndMeta<P,M> extends ActionWithPayload<P>

etc.

@sstarrAtmeta
Copy link

I believe this issue should now be closed, since the following commit will have made payload optional.
62deb4a

@JaKXz
Copy link
Contributor

JaKXz commented Jul 26, 2018

I'm going to close this as fixed in the latest published version, but please feel free to re-open if you are still experiencing issues!

@JaKXz JaKXz closed this as completed Jul 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants