From c14daafffb418f49c2850b840975af47161c536f Mon Sep 17 00:00:00 2001 From: Dmitry Lyzo Date: Fri, 18 Feb 2022 13:14:26 +0300 Subject: [PATCH] Remove type casting --- src/components/search/LiveTVSearchResults.tsx | 3 +-- src/components/search/SearchResults.tsx | 3 +-- src/components/search/SearchSuggestions.tsx | 3 +-- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/components/search/LiveTVSearchResults.tsx b/src/components/search/LiveTVSearchResults.tsx index f449a59fa..9f9874db2 100644 --- a/src/components/search/LiveTVSearchResults.tsx +++ b/src/components/search/LiveTVSearchResults.tsx @@ -72,8 +72,7 @@ const LiveTVSearchResults: FunctionComponent = ({ serv setChannels([]); if (query && collectionType === 'livetv') { - // TODO: Remove type casting once we're using a properly typed API client - const apiClient = (ServerConnections as any).getApiClient(serverId); + const apiClient = ServerConnections.getApiClient(serverId); // Movies row fetchItems(apiClient, { diff --git a/src/components/search/SearchResults.tsx b/src/components/search/SearchResults.tsx index 0b3d8213f..e814eba7f 100644 --- a/src/components/search/SearchResults.tsx +++ b/src/components/search/SearchResults.tsx @@ -99,8 +99,7 @@ const SearchResults: FunctionComponent = ({ serverId, parent setPeople([]); if (query) { - // TODO: Remove type casting once we're using a properly typed API client - const apiClient = (ServerConnections as any).getApiClient(serverId); + const apiClient = ServerConnections.getApiClient(serverId); // Movie libraries if (!collectionType || isMovies()) { diff --git a/src/components/search/SearchSuggestions.tsx b/src/components/search/SearchSuggestions.tsx index a09016e41..c13659c60 100644 --- a/src/components/search/SearchSuggestions.tsx +++ b/src/components/search/SearchSuggestions.tsx @@ -27,8 +27,7 @@ const SearchSuggestions: FunctionComponent = ({ serverId const [ suggestions, setSuggestions ] = useState([]); useEffect(() => { - // TODO: Remove type casting once we're using a properly typed API client - const apiClient = (ServerConnections as any).getApiClient(serverId); + const apiClient = ServerConnections.getApiClient(serverId); apiClient.getItems(apiClient.getCurrentUserId(), { SortBy: 'IsFavoriteOrLiked,Random',