[code quality] Fix unsafe argument of type any assigned to a parameter of type Subscription

This commit is contained in:
everoddandeven 2024-10-18 17:15:05 +02:00
parent e0ff4d9ca7
commit b5a3d2e73e
5 changed files with 7 additions and 7 deletions

View file

@ -230,7 +230,7 @@ export class DaemonService {
} }
private async openDatabase(): Promise<IDBPDatabase<any>> { private async openDatabase(): Promise<IDBPDatabase<any>> {
return await openDB<any>(this.dbName, 1, { return await openDB<IDBPDatabase<any>>(this.dbName, 1, {
upgrade(db) { upgrade(db) {
// Crea un archivio (store) per i settings se non esiste già // Crea un archivio (store) per i settings se non esiste già
if (!db.objectStoreNames.contains('settingsStore')) { if (!db.objectStoreNames.contains('settingsStore')) {

View file

@ -139,7 +139,7 @@ export class DetailComponent implements AfterViewInit, OnDestroy {
this.cards = this.createCards(); this.cards = this.createCards();
this.subscriptions.push(this.daemonData.syncStart.subscribe((info) => { this.subscriptions.push(<Subscription>this.daemonData.syncStart.subscribe((info) => {
if(!info.first) { if(!info.first) {
return; return;
} }
@ -150,7 +150,7 @@ export class DetailComponent implements AfterViewInit, OnDestroy {
})); }));
this.subscriptions.push(this.daemonData.syncInfoRefreshEnd.subscribe(() => { this.subscriptions.push(<Subscription>this.daemonData.syncInfoRefreshEnd.subscribe(() => {
this.refreshTables(); this.refreshTables();
this.cards = this.createCards(); this.cards = this.createCards();

View file

@ -41,11 +41,11 @@ export class NetworkComponent implements AfterViewInit, OnDestroy {
new NavbarLink('pills-limits-tab', '#pills-limit', 'pills-limit', false, 'Limit') new NavbarLink('pills-limits-tab', '#pills-limit', 'pills-limit', false, 'Limit')
]; ];
this.subscriptions.push(this.daemonData.netStatsRefreshEnd.subscribe(() => { this.subscriptions.push(<Subscription>this.daemonData.netStatsRefreshEnd.subscribe(() => {
this.refreshNetStatsHistory(); this.refreshNetStatsHistory();
})); }));
this.subscriptions.push(this.daemonData.syncEnd.subscribe(() => { this.subscriptions.push(<Subscription>this.daemonData.syncEnd.subscribe(() => {
this.loadConnectionsTable(); this.loadConnectionsTable();
})); }));

View file

@ -66,7 +66,7 @@ export class PeersComponent implements AfterViewInit, OnDestroy {
$publicNodesTable.bootstrapTable('load', this.daemonData.publicNodes); $publicNodesTable.bootstrapTable('load', this.daemonData.publicNodes);
$peerListTable.bootstrapTable('load', this.daemonData.peerList); $peerListTable.bootstrapTable('load', this.daemonData.peerList);
const sub = this.daemonData.syncEnd.subscribe(() => { const sub = <Subscription>this.daemonData.syncEnd.subscribe(() => {
$publicNodesTable.bootstrapTable('load', this.daemonData.publicNodes); $publicNodesTable.bootstrapTable('load', this.daemonData.publicNodes);
//$peerListTable.bootstrapTable('load', this.daemonData.peerList); //$peerListTable.bootstrapTable('load', this.daemonData.peerList);
}); });

View file

@ -100,7 +100,7 @@ export class TransactionsComponent implements AfterViewInit, OnDestroy {
this.navbarService.setLinks(this.navbarLinks); this.navbarService.setLinks(this.navbarLinks);
this.initTables(); this.initTables();
this.subscriptions.push(this.daemonData.syncEnd.subscribe(() => { this.subscriptions.push(<Subscription>this.daemonData.syncEnd.subscribe(() => {
this.refreshTables(); this.refreshTables();
})); }));
}); });