mirror of
https://github.com/bitwarden/browser
synced 2025-12-10 05:13:29 +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:
@@ -160,7 +160,7 @@ export class AccountSwitcherService {
|
||||
throwError(() => new Error(AccountSwitcherService.incompleteAccountSwitchError)),
|
||||
}),
|
||||
),
|
||||
).catch((err) => {
|
||||
).catch((err): any => {
|
||||
if (
|
||||
err instanceof Error &&
|
||||
err.message === AccountSwitcherService.incompleteAccountSwitchError
|
||||
|
||||
@@ -161,7 +161,7 @@ export default class AutofillService implements AutofillServiceInterface {
|
||||
|
||||
// Create a timeout observable that emits an empty array if pageDetailsFromTab$ hasn't emitted within 1 second.
|
||||
const pageDetailsTimeout$ = timer(1000).pipe(
|
||||
map(() => []),
|
||||
map((): any => []),
|
||||
takeUntil(sharedPageDetailsFromTab$),
|
||||
);
|
||||
|
||||
|
||||
@@ -21,9 +21,7 @@ export class BrowserRouterService {
|
||||
child = child.firstChild;
|
||||
}
|
||||
|
||||
// TODO: Eslint upgrade. Please resolve this since the ?? does nothing
|
||||
// eslint-disable-next-line no-constant-binary-expression
|
||||
const updateUrl = !child?.data?.doNotSaveUrl ?? true;
|
||||
const updateUrl = !child?.data?.doNotSaveUrl;
|
||||
|
||||
if (updateUrl) {
|
||||
this.setPreviousUrl(event.url);
|
||||
|
||||
@@ -62,9 +62,7 @@ export class PopupRouterCacheService {
|
||||
child = child.firstChild;
|
||||
}
|
||||
|
||||
// TODO: Eslint upgrade. Please resolve this since the ?? does nothing
|
||||
// eslint-disable-next-line no-constant-binary-expression
|
||||
return !child?.data?.doNotSaveUrl ?? true;
|
||||
return !child?.data?.doNotSaveUrl;
|
||||
}),
|
||||
switchMap((event) => this.push(event.url)),
|
||||
)
|
||||
|
||||
@@ -761,11 +761,13 @@ function createSeededVaultPopupListFiltersService(
|
||||
const collectionServiceMock = {
|
||||
decryptedCollections$: () => seededCollections$,
|
||||
getAllNested: () =>
|
||||
seededCollections$.value.map((c) => ({
|
||||
children: [],
|
||||
node: c,
|
||||
parent: null,
|
||||
})),
|
||||
seededCollections$.value.map(
|
||||
(c): TreeNode<CollectionView> => ({
|
||||
children: [],
|
||||
node: c,
|
||||
parent: null as any,
|
||||
}),
|
||||
),
|
||||
} as any;
|
||||
|
||||
const folderServiceMock = {
|
||||
|
||||
Reference in New Issue
Block a user