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

Action Creators should correctly type their params #917

Open
eriknelson opened this issue Jun 17, 2020 · 0 comments
Open

Action Creators should correctly type their params #917

eriknelson opened this issue Jun 17, 2020 · 0 comments
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug. tech-debt Issues describing technical debt to be refactored when appropriate

Comments

@eriknelson
Copy link
Contributor

Many of the Action Creators are using bad types for their parameters, imported
from ReturnType of the conversion functions. This is incorrect, and instead
they should be using the I variants that are the composite objects that
hold both the Mig object + its references (like Secrets). Usually these types
are found in a types.ts file, although we are inconsistent.

A PR sufficient for closing this issue should ensure that the described types
all exist, follow the same name convention, and that the action creator's
arguments are correctly typed to accept them

Ex: updateCusters: ICluster[] NOT updateClusters: IMigCluster[]

I've just been burned for a few hours trying to debug an issue that would have
been caught immediately by the compiler had I typed this correctly :)

@eriknelson eriknelson self-assigned this Jun 17, 2020
@eriknelson eriknelson added tech-debt Issues describing technical debt to be refactored when appropriate kind/bug Categorizes issue or PR as related to a bug. labels Jun 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. tech-debt Issues describing technical debt to be refactored when appropriate
Projects
None yet
Development

No branches or pull requests

1 participant