Skip to content

Commit

Permalink
refactor(vue): use MaybeRef type
Browse files Browse the repository at this point in the history
  • Loading branch information
negezor committed Jul 10, 2024
1 parent 19a52e0 commit 4b3d40c
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions packages/embla-carousel-vue/src/components/emblaCarouselVue.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
import { Ref, isRef, watch, onMounted, onBeforeUnmount, shallowRef } from 'vue'
import {
Ref,
MaybeRef,
isRef,
watch,
onMounted,
onBeforeUnmount,
shallowRef
} from 'vue'
import {
areOptionsEqual,
arePluginsEqual,
Expand All @@ -16,8 +24,8 @@ export type EmblaCarouselVueType = [
]

function emblaCarouselVue(
options: EmblaOptionsType | Ref<EmblaOptionsType> = {},
plugins: EmblaPluginType[] | Ref<EmblaPluginType[]> = []
options: MaybeRef<EmblaOptionsType> = {},
plugins: MaybeRef<EmblaPluginType[]> = []
): EmblaCarouselVueType {
const isRefOptions = isRef(options)
const isRefPlugins = isRef(plugins)
Expand Down

0 comments on commit 4b3d40c

Please sign in to comment.