Skip to content

Commit 6e57ab3

Browse files
committed
Fixes compilation warnings: consolidates redundant cases
1 parent c8c369c commit 6e57ab3

File tree

1 file changed

+6
-12
lines changed

1 file changed

+6
-12
lines changed

src/webviews/plus/graph/graphWebview.utils.ts

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,7 @@ export function hasGitReference(o: unknown): o is { ref: GitReference } {
129129

130130
export function toGraphHostingServiceType(id: string): GraphHostingServiceType | undefined {
131131
switch (id) {
132-
case 'github' satisfies RemoteProviderId:
133-
case 'github' satisfies Unbrand<GkProviderId>:
132+
case 'github' satisfies RemoteProviderId & Unbrand<GkProviderId>:
134133
case GitCloudHostIntegrationId.GitHub:
135134
return 'github';
136135

@@ -139,8 +138,7 @@ export function toGraphHostingServiceType(id: string): GraphHostingServiceType |
139138
case GitSelfManagedHostIntegrationId.CloudGitHubEnterprise:
140139
return 'githubEnterprise';
141140

142-
case 'gitlab' satisfies RemoteProviderId:
143-
case 'gitlab' satisfies Unbrand<GkProviderId>:
141+
case 'gitlab' satisfies RemoteProviderId & Unbrand<GkProviderId>:
144142
case GitCloudHostIntegrationId.GitLab:
145143
return 'gitlab';
146144

@@ -155,8 +153,7 @@ export function toGraphHostingServiceType(id: string): GraphHostingServiceType |
155153
case GitCloudHostIntegrationId.AzureDevOps:
156154
return 'azureDevops';
157155

158-
case 'bitbucket' satisfies RemoteProviderId:
159-
case 'bitbucket' satisfies Unbrand<GkProviderId>:
156+
case 'bitbucket' satisfies RemoteProviderId & Unbrand<GkProviderId>:
160157
case GitCloudHostIntegrationId.Bitbucket:
161158
return 'bitbucket';
162159

@@ -172,8 +169,7 @@ export function toGraphHostingServiceType(id: string): GraphHostingServiceType |
172169

173170
export function toGraphIssueTrackerType(id: string): GraphIssueTrackerType | undefined {
174171
switch (id) {
175-
case 'github' satisfies RemoteProviderId:
176-
case 'github' satisfies Unbrand<GkProviderId>:
172+
case 'github' satisfies RemoteProviderId & Unbrand<GkProviderId>:
177173
case GitCloudHostIntegrationId.GitHub:
178174
return 'github';
179175

@@ -182,8 +178,7 @@ export function toGraphIssueTrackerType(id: string): GraphIssueTrackerType | und
182178
case GitSelfManagedHostIntegrationId.CloudGitHubEnterprise:
183179
return 'githubEnterprise';
184180

185-
case 'gitlab' satisfies RemoteProviderId:
186-
case 'gitlab' satisfies Unbrand<GkProviderId>:
181+
case 'gitlab' satisfies RemoteProviderId & Unbrand<GkProviderId>:
187182
case GitCloudHostIntegrationId.GitLab:
188183
return 'gitlab';
189184

@@ -198,8 +193,7 @@ export function toGraphIssueTrackerType(id: string): GraphIssueTrackerType | und
198193
case GitCloudHostIntegrationId.AzureDevOps:
199194
return 'azureDevops';
200195

201-
case 'bitbucket' satisfies RemoteProviderId:
202-
case 'bitbucket' satisfies Unbrand<GkProviderId>:
196+
case 'bitbucket' satisfies RemoteProviderId & Unbrand<GkProviderId>:
203197
case GitCloudHostIntegrationId.Bitbucket:
204198
return 'bitbucket';
205199

0 commit comments

Comments
 (0)