Fix more typing issues (#928)

* Fix or comment several ts-ignores

* Fix typing related to BaseOverflowButton

* Remove unused functionality of useCookbooks, fix usage bug

* Fix more typing, add some comments

* Only allow ts-ignore if it has a comment
This commit is contained in:
Philipp Fischbeck
2022-01-16 03:38:11 +01:00
committed by GitHub
parent c4540f1395
commit f794208862
45 changed files with 126 additions and 249 deletions

View File

@@ -162,6 +162,7 @@ import { useRecipes, allRecipes } from "~/composables/recipes";
import { Recipe } from "~/types/api-types/recipe";
import GroupExportData from "~/components/Domain/Group/GroupExportData.vue";
import { GroupDataExport } from "~/api/class-interfaces/recipe-bulk-actions";
import { MenuItem } from "~/components/global/BaseOverflowButton.vue";
const MODES = {
tag: "tag",
@@ -191,7 +192,7 @@ export default defineComponent({
id: false,
owner: false,
tags: true,
tools: "Tools",
tools: true,
categories: true,
recipeYield: false,
dateAdded: false,
@@ -207,29 +208,25 @@ export default defineComponent({
dateAdded: "Date Added",
};
const actions = [
const actions: MenuItem[] = [
{
icon: $globals.icons.database,
text: "Export",
value: 0,
event: "export-selected",
},
{
icon: $globals.icons.tags,
text: "Tag",
value: 1,
event: "tag-selected",
},
{
icon: $globals.icons.tags,
text: "Categorize",
value: 2,
event: "categorize-selected",
},
{
icon: $globals.icons.delete,
text: "Delete",
value: 3,
event: "delete-selected",
},
];
@@ -264,7 +261,6 @@ export default defineComponent({
// All Recipes
function selectAll() {
// @ts-ignore
selected.value = allRecipes.value;
}