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:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user