From 54909304287f3c04dcfb39660be8ead57dc95440 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 24 May 2023 16:48:54 +0200 Subject: Remove suppressImplicitAnyIndexErrors It's deprecated by TS --- client/src/assets/player/shared/p2p-media-loader/hls-plugin.ts | 2 +- client/src/assets/player/shared/p2p-media-loader/segment-validator.ts | 2 +- client/src/assets/player/shared/webtorrent/webtorrent-plugin.ts | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'client/src/assets') diff --git a/client/src/assets/player/shared/p2p-media-loader/hls-plugin.ts b/client/src/assets/player/shared/p2p-media-loader/hls-plugin.ts index 63f27eecf..d05d6193c 100644 --- a/client/src/assets/player/shared/p2p-media-loader/hls-plugin.ts +++ b/client/src/assets/player/shared/p2p-media-loader/hls-plugin.ts @@ -349,7 +349,7 @@ class Html5Hlsjs { } private _oneLevelObjClone (obj: { [ id: string ]: any }) { - const result = {} + const result: { [id: string]: any } = {} const objKeys = Object.keys(obj) for (let i = 0; i < objKeys.length; i++) { result[objKeys[i]] = obj[objKeys[i]] diff --git a/client/src/assets/player/shared/p2p-media-loader/segment-validator.ts b/client/src/assets/player/shared/p2p-media-loader/segment-validator.ts index 6e9bcf103..44a31bfb4 100644 --- a/client/src/assets/player/shared/p2p-media-loader/segment-validator.ts +++ b/client/src/assets/player/shared/p2p-media-loader/segment-validator.ts @@ -79,7 +79,7 @@ function fetchSha256Segments (options: { segmentsSha256Url: string authorizationHeader: () => string requiresAuth: boolean -}) { +}): Promise { const { serverUrl, segmentsSha256Url, requiresAuth, authorizationHeader } = options const headers = requiresAuth && isSameOrigin(serverUrl, segmentsSha256Url) diff --git a/client/src/assets/player/shared/webtorrent/webtorrent-plugin.ts b/client/src/assets/player/shared/webtorrent/webtorrent-plugin.ts index 46d009410..3dde44a60 100644 --- a/client/src/assets/player/shared/webtorrent/webtorrent-plugin.ts +++ b/client/src/assets/player/shared/webtorrent/webtorrent-plugin.ts @@ -339,7 +339,7 @@ class WebTorrentPlugin extends Plugin { if (err.message.indexOf('incorrect info hash') !== -1) { logger.error('Incorrect info hash detected, falling back to torrent file.') const newOptions = { forcePlay: true, seek: options.seek } - return this.addTorrent(this.torrent['xs'], previousVideoFile, newOptions, done) + return this.addTorrent((this.torrent as any)['xs'], previousVideoFile, newOptions, done) } // Remote instance is down @@ -582,7 +582,7 @@ class WebTorrentPlugin extends Plugin { private stopTorrent (torrent: WebTorrent.Torrent) { torrent.pause() // Pause does not remove actual peers (in particular the webseed peer) - torrent.removePeer(torrent['ws']) + torrent.removePeer((torrent as any)['ws']) } private renderFileInFakeElement (file: WebTorrent.TorrentFile, delay: number) { -- cgit v1.2.3