Consolidate types #197
Labels
good first issue
Good for newcomers
Medium Priority
Nice to have that would be done by early May for the state rollout.
Tech Debt
An enhancement that needs to be done to the codebase that does not impact functionality
This issue is to consolidate types in order to reduce duplication.
For example, as part of the the recent "display pol.is surveys based on demographics questions" feature, I had to update the answer type in several places to include an ID.
Ideally, this type would be declared in one spot.
For this issue, document places where types can be consolidated and update the types
References:
https://blog.logrocket.com/types-vs-interfaces-typescript/
https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#differences-between-type-aliases-and-interfaces
The text was updated successfully, but these errors were encountered: