Resolved all ts lint errors on build

This commit is contained in:
2022-08-11 18:37:33 +02:00
parent f7fe582200
commit 41067aae84
19 changed files with 130 additions and 66 deletions

View File

@@ -1,5 +1,5 @@
import router from "../routes";
import { ListTypes } from "../interfaces/IList";
import { MediaTypes } from "../interfaces/IList";
import type { IStatePopup } from "../interfaces/IStatePopup";
const removeIncludedQueryParams = (params, key) => {
@@ -16,7 +16,7 @@ function paramsToObject(entries) {
return result;
}
const updateQueryParams = (id: number | null = null, type: string = "") => {
const updateQueryParams = (id: number = null, type: MediaTypes = null) => {
let params = new URLSearchParams(window.location.search);
params = removeIncludedQueryParams(params, "movie");
params = removeIncludedQueryParams(params, "show");
@@ -59,7 +59,7 @@ export default {
}
},
actions: {
open: ({ commit }, { id, type = "movie" }) => {
open: ({ commit }, { id, type }: { id: number; type: MediaTypes }) => {
if (!isNaN(id)) id = Number(id);
commit("SET_OPEN", { id, type });
updateQueryParams(id, type);