Changed defineEmits to be more legible

This commit is contained in:
Alexis
2025-05-07 13:37:23 +02:00
parent 09cd25ce33
commit 896bac5f83
9 changed files with 15 additions and 23 deletions

View File

@@ -13,7 +13,7 @@ const { category } = defineProps<{
}>()
const emit = defineEmits<{
(e: "on-delete-category", payload: Category): void
"on-delete-category": [payload: Category]
}>()
type RowMode = "edit" | "view"

View File

@@ -57,13 +57,11 @@ async function handleSubmit() {
}
/**
* === Watch for name changes to display above ===
* Watch for name changes to display above
*/
const emit = defineEmits<{
// eslint-disable-next-line no-unused-vars
(e: "on-changed-name", calendarName: string): void
// eslint-disable-next-line no-unused-vars
(e: "on-close"): void
"on-changed-name": [calendarName: string]
"on-close": []
}>()
/** Hook to emit a debounced event for the changed skeleton name */

View File

@@ -53,13 +53,11 @@ async function handleSubmit() {
}
/**
* === Watch for name changes to display above ===
* Watch for name changes to display above
*/
const emit = defineEmits<{
// eslint-disable-next-line no-unused-vars
(e: "on-changed-name", calendarName: string): void
// eslint-disable-next-line no-unused-vars
(e: "on-close"): void
"on-changed-name": [calendarName: string]
"on-close": []
}>()
/** Hook to emit a debounced event for the changed skeleton name */

View File

@@ -12,7 +12,7 @@ const props = defineProps<{
}>()
defineEmits<{
(e: "query:date-jump", payload: RPGDate): void
"query:date-jump": [payload: RPGDate]
}>()
const { getFormattedDateTitle } = useCalendar()

View File

@@ -10,7 +10,7 @@ const props = defineProps<{
}>()
defineEmits<{
(e: "query:date-jump", payload: RPGDate): void
"query:date-jump": [payload: RPGDate]
}>()
const { getRelativeString, defaultDate, getFormattedDateTitle } = useCalendar()

View File

@@ -13,7 +13,7 @@ const props = defineProps<{
}>()
const emit = defineEmits<{
(e: "on-open-create-dialog", date: RPGDate): void
"on-open-create-dialog": [date: RPGDate]
}>()
const calendarTile = ref()