Skip to content

Commit

Permalink
replace MaybeElement import
Browse files Browse the repository at this point in the history
  • Loading branch information
CachedaCodes committed Jan 19, 2024
1 parent 6ae369f commit e6ab9e6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions packages/x-components/src/components/display-emitter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

<script lang="ts">
import { defineComponent, onUnmounted, PropType, Ref, ref } from 'vue';
import { MaybeElement } from '@vueuse/core';
import { TaggingRequest } from '@empathyco/x-types';
import { useEmitDisplayEvent } from '../composables/use-on-display';
import { WireMetadata } from '../wiring';
Expand Down Expand Up @@ -41,7 +40,7 @@
setup(props) {
const root = ref(null);
const { unwatchDisplay } = useEmitDisplayEvent({
element: root as Ref<MaybeElement>,
element: root as Ref<HTMLElement | null>,
taggingRequest: props.payload,
...(props.eventMetadata && { eventMetadata: props.eventMetadata })
});
Expand Down
4 changes: 2 additions & 2 deletions packages/x-components/src/composables/use-on-display.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Ref, watch, WatchStopHandle } from 'vue';
import { MaybeElement, useElementVisibility } from '@vueuse/core';
import { useElementVisibility } from '@vueuse/core';
import { TaggingRequest } from '@empathyco/x-types';
import { WireMetadata } from '../wiring';
import { use$x } from './use-$x';
Expand Down Expand Up @@ -73,7 +73,7 @@ export function useEmitDisplayEvent({
* Options for the {@link useOnDisplay} composable.
*/
type UseOnDisplayOptions = {
element: HTMLElement | Ref<MaybeElement>;
element: HTMLElement | Ref<HTMLElement | null>;
callback: () => void;
triggerOnce?: boolean;
};
Expand Down

0 comments on commit e6ab9e6

Please sign in to comment.