Skip to content

Commit df147d2

Browse files
refactor: update type definitions for block components
1 parent d6d443c commit df147d2

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ import {
7777
+ LazyKirbyBlockNoteHeader,
7878
} from '#components'
7979

80-
const blockComponents: Partial<Record<string, new () => ComponentPublicInstance>> = {
80+
const blockComponents: Partial<Record<string, Component> = {
8181
// Custom blocks
8282
+ 'note-header': LazyKirbyBlockNoteHeader,
8383
}

components/Kirby/Blocks.vue

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<script setup lang="ts">
22
import type { KirbyBlock } from '#nuxt-kql'
3-
import type { ComponentPublicInstance } from 'vue'
3+
import type { Component } from 'vue'
44
import {
55
LazyKirbyBlockHeading,
66
LazyKirbyBlockImage,
@@ -18,9 +18,7 @@ defineProps<{
1818
blocks: KirbyBlock<string>[]
1919
}>()
2020
21-
type ComponentConstructor = new (...args: any[]) => ComponentPublicInstance
22-
23-
const blockComponents: Record<string, ComponentConstructor> = {
21+
const blockComponents: Record<string, Component> = {
2422
// Built-in Kirby blocks
2523
heading: LazyKirbyBlockHeading,
2624
image: LazyKirbyBlockImage,

0 commit comments

Comments
 (0)