1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-06 00:13:28 +00:00

[PM-22305] Upgrade typescript to 5.8 (#15044)

Upgrade to the latest supported typescript version in Angular.

Resolved TS errors by:
  - adding `: any` which is what the compiler previously implied and now warns about.
  - adding `toJSON` to satisfy requirement.
This commit is contained in:
Oscar Hinton
2025-10-06 18:39:40 +02:00
committed by GitHub
parent 2ce194c190
commit 8cf379d997
21 changed files with 60 additions and 52 deletions

View File

@@ -28,7 +28,7 @@ describe("AdditionalOptionsSectionComponent", () => {
let passwordRepromptService: MockProxy<PasswordRepromptService>;
let passwordRepromptEnabled$: BehaviorSubject<boolean>;
const getInitialCipherView = jest.fn(() => null);
const getInitialCipherView = jest.fn((): any => null);
const formStatusChange$ = new BehaviorSubject<"enabled" | "disabled">("enabled");
beforeEach(async () => {

View File

@@ -34,7 +34,7 @@ describe("AutofillOptionsComponent", () => {
let domainSettingsService: MockProxy<DomainSettingsService>;
let autofillSettingsService: MockProxy<AutofillSettingsServiceAbstraction>;
let platformUtilsService: MockProxy<PlatformUtilsService>;
const getInitialCipherView = jest.fn(() => null);
const getInitialCipherView = jest.fn((): any => null);
const formStatusChange$ = new BehaviorSubject<"enabled" | "disabled">("enabled");
beforeEach(async () => {

View File

@@ -20,7 +20,7 @@ describe("CardDetailsSectionComponent", () => {
let registerChildFormSpy: jest.SpyInstance;
let patchCipherSpy: jest.SpyInstance;
const getInitialCipherView = jest.fn(() => null);
const getInitialCipherView = jest.fn((): any => null);
beforeEach(async () => {
cipherFormProvider = mock<CipherFormContainer>({ getInitialCipherView });

View File

@@ -37,7 +37,7 @@ describe("CipherFormComponent", () => {
provide: CipherFormCacheService,
useValue: { init: jest.fn(), getCachedCipherView: jest.fn() },
},
{ provide: ViewCacheService, useValue: { signal: jest.fn(() => () => null) } },
{ provide: ViewCacheService, useValue: { signal: jest.fn(() => (): any => null) } },
{ provide: ConfigService, useValue: mock<ConfigService>() },
],
}).compileComponents();

View File

@@ -42,7 +42,7 @@ describe("LoginDetailsSectionComponent", () => {
let configService: MockProxy<ConfigService>;
const collect = jest.fn().mockResolvedValue(null);
const getInitialCipherView = jest.fn(() => null);
const getInitialCipherView = jest.fn((): any => null);
beforeEach(async () => {
getInitialCipherView.mockClear();