From 367cd7a2ac562957749b82c273f9365fb10e465d Mon Sep 17 00:00:00 2001 From: Marley Powell Date: Thu, 11 Nov 2021 12:22:59 +0000 Subject: [PATCH] refactor: Updated type properties to be optional instead of undefined union. Signed-off-by: Marley Powell --- plugins/azure-devops-common/src/types.ts | 60 ++++++++++++------------ 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/plugins/azure-devops-common/src/types.ts b/plugins/azure-devops-common/src/types.ts index 458eaa76d4..61488d4e98 100644 --- a/plugins/azure-devops-common/src/types.ts +++ b/plugins/azure-devops-common/src/types.ts @@ -128,54 +128,54 @@ export type PullRequestOptions = { }; export interface DashboardPullRequest { - pullRequestId: number | undefined; - title: string | undefined; - description: string | undefined; - repository: Repository | undefined; - createdBy: CreatedBy | undefined; + pullRequestId?: number; + title?: string; + description?: string; + repository?: Repository; + createdBy?: CreatedBy; hasAutoComplete: boolean; - policies: Policy[] | undefined; - reviewers: Reviewer[] | undefined; - creationDate: string | undefined; - status: PullRequestStatus | undefined; - isDraft: boolean | undefined; - link: string | undefined; + policies?: Policy[]; + reviewers?: Reviewer[]; + creationDate?: string; + status?: PullRequestStatus; + isDraft?: boolean; + link?: string; } export interface Reviewer { - id: string | undefined; - displayName: string | undefined; - imageUrl: string | undefined; - isRequired: boolean | undefined; - isContainer: boolean | undefined; + id?: string; + displayName?: string; + imageUrl?: string; + isRequired?: boolean; + isContainer?: boolean; voteStatus: PullRequestVoteStatus; } export interface Policy { - id: number | undefined; + id?: number; type: PolicyType; - status: PolicyEvaluationStatus | undefined; - text: string | undefined; - link: string | undefined; + status?: PolicyEvaluationStatus; + text?: string; + link?: string; } export interface CreatedBy { - id: string | undefined; - displayName: string | undefined; - uniqueName: string | undefined; - imageUrl: string | undefined; + id?: string; + displayName?: string; + uniqueName?: string; + imageUrl?: string; } export interface Repository { - id: string | undefined; - name: string | undefined; - url: string | undefined; + id?: string; + name?: string; + url?: string; } export interface Team { - id: string | undefined; - name: string | undefined; - memberIds: string[] | undefined; + id?: string; + name?: string; + memberIds?: string[]; } /**