mirror of
https://github.com/Unleash/unleash.git
synced 2025-11-24 20:06:55 +01:00
Chore: use union types
This commit is contained in:
parent
1cd9d3ffee
commit
4d2eca0cf3
@ -3,7 +3,7 @@ import { IFeatureStrategy } from '../../interfaces/strategy';
|
|||||||
import { IUser } from '../../interfaces/user';
|
import { IUser } from '../../interfaces/user';
|
||||||
import { SetStrategySortOrderSchema } from '../../openapi';
|
import { SetStrategySortOrderSchema } from '../../openapi';
|
||||||
|
|
||||||
export interface IChangeRequest {
|
export type IChangeRequest = {
|
||||||
id: number;
|
id: number;
|
||||||
title: string;
|
title: string;
|
||||||
project: string;
|
project: string;
|
||||||
@ -17,9 +17,15 @@ export interface IChangeRequest {
|
|||||||
rejections: IChangeRequestApproval[];
|
rejections: IChangeRequestApproval[];
|
||||||
comments: IChangeRequestComment[];
|
comments: IChangeRequestComment[];
|
||||||
conflict?: string;
|
conflict?: string;
|
||||||
state: ChangeRequestState;
|
} & (
|
||||||
schedule?: ChangeRequestSchedule;
|
| {
|
||||||
|
state: Exclude<ChangeRequestState, 'Scheduled'>;
|
||||||
}
|
}
|
||||||
|
| {
|
||||||
|
state: 'Scheduled';
|
||||||
|
schedule: ChangeRequestSchedule;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
export type ChangeRequestSchedule =
|
export type ChangeRequestSchedule =
|
||||||
| {
|
| {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user