1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-10 13:23:34 +00:00

Upgrade typescript to 5.5 (#14794)

Typescript 5.5 is supported by our existing Angular version and the next major. Since there are some breaking changes we're creating a separate PR to handle this upgrade and tackling the breaking changes.

TS seems to have changed how they type infer boolean conditions and it infers into type is which means the overloaded function has a different signature. Explicitly marking the return type as boolean makes the TS compiler happy without the behaviour changing.
This commit is contained in:
Oscar Hinton
2025-05-16 09:23:38 +02:00
committed by GitHub
parent 323f0775fd
commit 499715cac3
4 changed files with 8 additions and 9 deletions

View File

@@ -119,7 +119,7 @@ export class TwoFactorSetupComponent extends BaseTwoFactorSetupComponent impleme
return this.apiService.getTwoFactorOrganizationProviders(this.organizationId);
}
protected filterProvider(type: TwoFactorProviderType) {
protected filterProvider(type: TwoFactorProviderType): boolean {
return type !== TwoFactorProviderType.OrganizationDuo;
}
}

View File

@@ -273,7 +273,7 @@ export class TwoFactorSetupComponent implements OnInit, OnDestroy {
return this.apiService.getTwoFactorProviders();
}
protected filterProvider(type: TwoFactorProviderType) {
protected filterProvider(type: TwoFactorProviderType): boolean {
return type === TwoFactorProviderType.OrganizationDuo;
}