1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-09-19 17:52:45 +02:00
unleash.unleash/frontend/src/component
Thomas Heartman 39145e2617
refactor: use union types for change request types (#5870)
This changes the two interfaces IChangeRequest and
IChangeRequestSchedule to be union types instead of interfaces. It also
extracts the constituents of those union types into proper types
themselves (so that they can be used in function type signatures etc).
It also updates the type names.

This turned out to be more work than I had imagined, but I think the end
result pays off, giving us more type safety and control.

I wanted to use just `ChangeRequest` for the IChangeRequest type, but
that caused issues due to naming collisions with the `ChangeRequest`
component that we have, causing tests to fail. I've named it
`ChangeRequestType` as a potential solution, but suggestions are
welcome.

The relevant changes are in
`frontend/src/component/changeRequest/changeRequest.types.ts`.
Everything else is updated references and some necessary refactoring to
respect the new types.
2024-01-12 13:15:43 +05:30
..
accessOverview chore: add no unused imports biome rule (#5855) 2024-01-11 12:44:05 +00:00
admin chore: add no unused imports biome rule (#5855) 2024-01-11 12:44:05 +00:00
application Fix: icon rendering issue in ApplicationList and add help to app update (#5730) 2023-12-27 18:35:08 +01:00
archive chore: add no unused imports biome rule (#5855) 2024-01-11 12:44:05 +00:00
banners chore: add no unused imports biome rule (#5855) 2024-01-11 12:44:05 +00:00
changeRequest refactor: use union types for change request types (#5870) 2024-01-12 13:15:43 +05:30
common chore: add no unused imports biome rule (#5855) 2024-01-11 12:44:05 +00:00
context chore: add no unused imports biome rule (#5855) 2024-01-11 12:44:05 +00:00
demo fix: demo banner zIndex, display on top (#5776) 2024-01-05 14:57:34 +00:00
environments feat: biome lint frontend (#4903) 2023-10-02 13:25:46 +01:00
events chore: add no unused imports biome rule (#5855) 2024-01-11 12:44:05 +00:00
feature refactor: use union types for change request types (#5870) 2024-01-12 13:15:43 +05:30
featureTypes feat: biome lint frontend (#4903) 2023-10-02 13:25:46 +01:00
feedback chore: add no unused imports biome rule (#5855) 2024-01-11 12:44:05 +00:00
feedbackNew chore: add no unused imports biome rule (#5855) 2024-01-11 12:44:05 +00:00
filter chore: add no unused imports biome rule (#5855) 2024-01-11 12:44:05 +00:00
incomingWebhooks chore: incoming webhooks table (#5837) 2024-01-11 12:05:14 +00:00
integrations chore: incoming webhooks table (#5837) 2024-01-11 12:05:14 +00:00
layout refactor: use union types for change request types (#5870) 2024-01-12 13:15:43 +05:30
loginHistory fix: date should sort asc/desc properly (#5335) 2023-11-14 14:47:28 +02:00
maintenance feat: add new sticky component to handle stacked stickies (#5088) 2023-10-19 15:50:37 +01:00
menu chore: add no unused imports biome rule (#5855) 2024-01-11 12:44:05 +00:00
playground/Playground chore: add no unused imports biome rule (#5855) 2024-01-11 12:44:05 +00:00
project refactor: use union types for change request types (#5870) 2024-01-12 13:15:43 +05:30
providers feat: add CREATE_TAG_TYPE permission (#5386) 2023-11-22 10:20:19 +00:00
segments chore: add no unused imports biome rule (#5855) 2024-01-11 12:44:05 +00:00
splash chore(deps): update dependency @biomejs/biome to v1.4.0 (#5288) 2023-11-28 09:32:00 +00:00
strategies feat: biome lint frontend (#4903) 2023-10-02 13:25:46 +01:00
tags chore: add no unused imports biome rule (#5855) 2024-01-11 12:44:05 +00:00
user chore: add no unused imports biome rule (#5855) 2024-01-11 12:44:05 +00:00
App.tsx refactor: move plausible context on top of feedback (#5824) 2024-01-10 11:31:41 +02:00
InitialRedirect.tsx