Skip to content

Commit f88c6b4

Browse files
committed
fix: <SliceZone />'s slices type issue
1 parent 30e6a19 commit f88c6b4

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/components/SliceZone.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,8 @@ export type SliceLike<TSliceType extends string = string> = (
8787
*
8888
* @typeParam TSlice - The type(s) of slices in the Slice Zone
8989
*/
90-
export type SliceZoneLike<
91-
TSlice extends SliceLike = SliceLike & Record<string, unknown>,
92-
> = readonly TSlice[];
90+
export type SliceZoneLike<TSlice extends SliceLike = SliceLike> =
91+
readonly TSlice[];
9392

9493
/**
9594
* Vue props for a component rendering content from a Prismic Slice using the
@@ -481,7 +480,9 @@ export const SliceZoneImpl = /*#__PURE__*/ defineComponent({
481480
name: "SliceZone",
482481
props: {
483482
slices: {
484-
type: Array as PropType<SliceZoneLike>,
483+
type: Array as PropType<
484+
SliceZoneLike<SliceLike & Record<string, unknown>>
485+
>,
485486
required: true,
486487
},
487488
components: {

0 commit comments

Comments
 (0)