Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 7432fd1

Browse filesBrowse files
ilyaliaoantfu
andauthored
feat(types): deprecate MaybeRef and MaybeRefOrGetter in favor of Vue's native (#4636)
Co-authored-by: Anthony Fu <github@antfu.me>
1 parent f968553 commit 7432fd1
Copy full SHA for 7432fd1

File tree

134 files changed

+177
-226
lines changed
Filter options

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Dismiss banner

134 files changed

+177
-226
lines changed

‎packages/core/createUnrefFn/index.ts

Copy file name to clipboardExpand all lines: packages/core/createUnrefFn/index.ts
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* This implementation is original ported from https://github.com/shorwood/pompaute by Stanley Horwood */
22

3-
import type { MaybeRef } from '@vueuse/shared'
3+
import type { MaybeRef } from 'vue'
44
import { toValue } from 'vue'
55

66
export type UnrefFn<T> = T extends (...args: infer A) => infer R

‎packages/core/onClickOutside/index.ts

Copy file name to clipboardExpand all lines: packages/core/onClickOutside/index.ts
+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import type { Fn, MaybeRefOrGetter } from '@vueuse/shared'
2-
import type { ComponentPublicInstance, VNode } from 'vue'
1+
import type { Fn } from '@vueuse/shared'
2+
import type { ComponentPublicInstance, MaybeRefOrGetter, VNode } from 'vue'
33
import type { ConfigurableWindow } from '../_configurable'
44
import type { MaybeElementRef } from '../unrefElement'
55
import { isIOS, noop } from '@vueuse/shared'

‎packages/core/onKeyStroke/index.ts

Copy file name to clipboardExpand all lines: packages/core/onKeyStroke/index.ts
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { MaybeRefOrGetter } from '@vueuse/shared'
1+
import type { MaybeRefOrGetter } from 'vue'
22
import { toValue } from 'vue'
33
import { defaultWindow } from '../_configurable'
44
import { useEventListener } from '../useEventListener'

‎packages/core/unrefElement/index.ts

Copy file name to clipboardExpand all lines: packages/core/unrefElement/index.ts
+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
import type { MaybeRef, MaybeRefOrGetter } from '@vueuse/shared'
2-
import type { ComponentPublicInstance } from 'vue'
1+
import type { ComponentPublicInstance, MaybeRef, MaybeRefOrGetter } from 'vue'
32
import { toValue } from 'vue'
43

54
export type VueInstance = ComponentPublicInstance

‎packages/core/useAnimate/index.ts

Copy file name to clipboardExpand all lines: packages/core/useAnimate/index.ts
+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import type { MaybeRef, Mutable } from '@vueuse/shared'
2-
import type { ComputedRef, ShallowRef, WritableComputedRef } from 'vue'
1+
import type { Mutable } from '@vueuse/shared'
2+
import type { ComputedRef, MaybeRef, ShallowRef, WritableComputedRef } from 'vue'
33
import type { ConfigurableWindow } from '../_configurable'
44
import type { MaybeComputedElementRef } from '../unrefElement'
55
import { isObject, objectOmit, tryOnMounted, tryOnScopeDispose } from '@vueuse/shared'

‎packages/core/useBase64/index.ts

Copy file name to clipboardExpand all lines: packages/core/useBase64/index.ts
+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
import type { MaybeRefOrGetter } from '@vueuse/shared'
2-
import type { ShallowRef } from 'vue'
1+
import type { MaybeRefOrGetter, ShallowRef } from 'vue'
32
import { isClient } from '@vueuse/shared'
43
import { isRef, shallowRef, toValue, watch } from 'vue'
54
import { getDefaultSerialization } from './serialization'

‎packages/core/useBreakpoints/index.ts

Copy file name to clipboardExpand all lines: packages/core/useBreakpoints/index.ts
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { MaybeRefOrGetter } from '@vueuse/shared'
1+
import type { MaybeRefOrGetter } from 'vue'
22
import type { ConfigurableWindow } from '../_configurable'
33
import { increaseWithUnit, pxValue, tryOnMounted } from '@vueuse/shared'
44
import { computed, shallowRef, toValue } from 'vue'

‎packages/core/useClipboard/index.ts

Copy file name to clipboardExpand all lines: packages/core/useClipboard/index.ts
+1-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
/* this implementation is original ported from https://github.com/logaretm/vue-use-web by Abdelrahman Awad */
22

3-
import type { MaybeRefOrGetter } from '@vueuse/shared'
4-
import type { ComputedRef } from 'vue'
3+
import type { ComputedRef, MaybeRefOrGetter } from 'vue'
54
import type { ConfigurableNavigator } from '../_configurable'
65
import { useTimeoutFn } from '@vueuse/shared'
76
import { computed, shallowRef, toValue } from 'vue'

‎packages/core/useClipboardItems/index.ts

Copy file name to clipboardExpand all lines: packages/core/useClipboardItems/index.ts
+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
import type { MaybeRefOrGetter } from '@vueuse/shared'
2-
import type { ComputedRef } from 'vue'
1+
import type { ComputedRef, MaybeRefOrGetter } from 'vue'
32
import type { ConfigurableNavigator } from '../_configurable'
43
import { useTimeoutFn } from '@vueuse/shared'
54
import { ref as deepRef, shallowRef, toValue } from 'vue'

‎packages/core/useCloned/index.ts

Copy file name to clipboardExpand all lines: packages/core/useCloned/index.ts
+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
import type { MaybeRefOrGetter } from '@vueuse/shared'
2-
import type { Ref, WatchOptions } from 'vue'
1+
import type { MaybeRefOrGetter, Ref, WatchOptions } from 'vue'
32
import { ref as deepRef, isRef, shallowRef, toValue, watch } from 'vue'
43

54
export interface UseClonedOptions<T = any> extends WatchOptions {

‎packages/core/useColorMode/index.ts

Copy file name to clipboardExpand all lines: packages/core/useColorMode/index.ts
+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
import type { MaybeRefOrGetter } from '@vueuse/shared'
2-
import type { ComputedRef, Ref } from 'vue'
1+
import type { ComputedRef, MaybeRefOrGetter, Ref } from 'vue'
32
import type { StorageLike } from '../ssr-handlers'
43
import type { MaybeElementRef } from '../unrefElement'
54
import type { UseStorageOptions } from '../useStorage'

‎packages/core/useCountdown/index.ts

Copy file name to clipboardExpand all lines: packages/core/useCountdown/index.ts
+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import type { MaybeRefOrGetter, Pausable } from '@vueuse/shared'
2-
import type { ShallowRef } from 'vue'
1+
import type { Pausable } from '@vueuse/shared'
2+
import type { MaybeRefOrGetter, ShallowRef } from 'vue'
33
import { useIntervalFn } from '@vueuse/shared'
44
import { shallowRef, toValue } from 'vue'
55

‎packages/core/useCssVar/index.ts

Copy file name to clipboardExpand all lines: packages/core/useCssVar/index.ts
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { MaybeRefOrGetter } from '@vueuse/shared'
1+
import type { MaybeRefOrGetter } from 'vue'
22
import type { ConfigurableWindow } from '../_configurable'
33
import type { MaybeElementRef } from '../unrefElement'
44
import { computed, shallowRef, toValue, watch } from 'vue'

‎packages/core/useCycleList/index.ts

Copy file name to clipboardExpand all lines: packages/core/useCycleList/index.ts
+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
import type { MaybeRef, MaybeRefOrGetter } from '@vueuse/shared'
2-
import type { ShallowRef, WritableComputedRef } from 'vue'
1+
import type { MaybeRef, MaybeRefOrGetter, ShallowRef, WritableComputedRef } from 'vue'
32
import { toRef } from '@vueuse/shared'
43
import { computed, shallowRef, toValue, watch } from 'vue'
54

‎packages/core/useDebouncedRefHistory/index.ts

Copy file name to clipboardExpand all lines: packages/core/useDebouncedRefHistory/index.ts
+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
import type { MaybeRefOrGetter } from '@vueuse/shared'
2-
import type { Ref } from 'vue'
1+
import type { MaybeRefOrGetter, Ref } from 'vue'
32
import type { UseRefHistoryOptions, UseRefHistoryReturn } from '../useRefHistory'
43
import { debounceFilter } from '@vueuse/shared'
54
import { useRefHistory } from '../useRefHistory'

‎packages/core/useDisplayMedia/index.ts

Copy file name to clipboardExpand all lines: packages/core/useDisplayMedia/index.ts
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { MaybeRef } from '@vueuse/shared'
1+
import type { MaybeRef } from 'vue'
22
import type { ConfigurableNavigator } from '../_configurable'
33
import { shallowRef, watch } from 'vue'
44
import { defaultNavigator } from '../_configurable'

‎packages/core/useDraggable/index.ts

Copy file name to clipboardExpand all lines: packages/core/useDraggable/index.ts
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { MaybeRefOrGetter } from '@vueuse/shared'
1+
import type { MaybeRefOrGetter } from 'vue'
22
import type { PointerType, Position } from '../types'
33
import { isClient, toRefs } from '@vueuse/shared'
44
import { computed, ref as deepRef, toValue } from 'vue'

‎packages/core/useDropZone/index.ts

Copy file name to clipboardExpand all lines: packages/core/useDropZone/index.ts
+1-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
import type { MaybeRef, MaybeRefOrGetter } from '@vueuse/shared'
2-
3-
import type { ShallowRef } from 'vue'
1+
import type { MaybeRef, MaybeRefOrGetter, ShallowRef } from 'vue'
42
import { isClient } from '@vueuse/shared'
53
// eslint-disable-next-line no-restricted-imports
64
import { shallowRef, unref } from 'vue'

‎packages/core/useElementByPoint/index.ts

Copy file name to clipboardExpand all lines: packages/core/useElementByPoint/index.ts
+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import type { MaybeRefOrGetter, Pausable } from '@vueuse/shared'
2-
import type { ComputedRef, ShallowRef } from 'vue'
1+
import type { Pausable } from '@vueuse/shared'
2+
import type { ComputedRef, MaybeRefOrGetter, ShallowRef } from 'vue'
33
import type { ConfigurableDocument } from '../_configurable'
44
import { useIntervalFn } from '@vueuse/shared'
55
import { shallowRef, toValue } from 'vue'

‎packages/core/useElementHover/index.ts

Copy file name to clipboardExpand all lines: packages/core/useElementHover/index.ts
+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
import type { MaybeRefOrGetter } from '@vueuse/shared'
2-
import type { ShallowRef } from 'vue'
1+
import type { MaybeRefOrGetter, ShallowRef } from 'vue'
32
import type { ConfigurableWindow } from '../_configurable'
43
import type { MaybeComputedElementRef } from '../unrefElement'
54
import { computed, shallowRef } from 'vue'

‎packages/core/useElementVisibility/index.ts

Copy file name to clipboardExpand all lines: packages/core/useElementVisibility/index.ts
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { MaybeRefOrGetter } from '@vueuse/shared'
1+
import type { MaybeRefOrGetter } from 'vue'
22
import type { ConfigurableWindow } from '../_configurable'
33
import type { MaybeComputedElementRef } from '../unrefElement'
44
import type { UseIntersectionObserverOptions } from '../useIntersectionObserver'

‎packages/core/useEventListener/index.ts

Copy file name to clipboardExpand all lines: packages/core/useEventListener/index.ts
+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import type { Arrayable, Fn, MaybeRef, MaybeRefOrGetter } from '@vueuse/shared'
1+
import type { Arrayable, Fn } from '@vueuse/shared'
2+
import type { MaybeRef, MaybeRefOrGetter } from 'vue'
23
import { isObject, toArray, tryOnScopeDispose, watchImmediate } from '@vueuse/shared'
34
// eslint-disable-next-line no-restricted-imports -- We specifically need to use unref here to distinguish between callbacks
45
import { computed, toValue, unref } from 'vue'

‎packages/core/useEventSource/index.ts

Copy file name to clipboardExpand all lines: packages/core/useEventSource/index.ts
+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import type { Fn, MaybeRefOrGetter } from '@vueuse/shared'
2-
import type { Ref, ShallowRef } from 'vue'
1+
import type { Fn } from '@vueuse/shared'
2+
import type { MaybeRefOrGetter, Ref, ShallowRef } from 'vue'
33
import { isClient, toRef, tryOnScopeDispose } from '@vueuse/shared'
44
import { ref as deepRef, shallowReadonly, shallowRef, watch } from 'vue'
55
import { useEventListener } from '../useEventListener'

‎packages/core/useFavicon/index.ts

Copy file name to clipboardExpand all lines: packages/core/useFavicon/index.ts
+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import type { MaybeRef, MaybeRefOrGetter, ReadonlyRefOrGetter } from '@vueuse/shared'
2-
import type { ComputedRef, Ref } from 'vue'
1+
import type { ReadonlyRefOrGetter } from '@vueuse/shared'
2+
import type { ComputedRef, MaybeRef, MaybeRefOrGetter, Ref } from 'vue'
33
import type { ConfigurableDocument } from '../_configurable'
44
import { toRef } from '@vueuse/shared'
55
import { watch } from 'vue'

‎packages/core/useFetch/index.ts

Copy file name to clipboardExpand all lines: packages/core/useFetch/index.ts
+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import type { EventHookOn, Fn, MaybeRefOrGetter, Stoppable } from '@vueuse/shared'
2-
import type { ComputedRef, ShallowRef } from 'vue'
1+
import type { EventHookOn, Fn, Stoppable } from '@vueuse/shared'
2+
import type { ComputedRef, MaybeRefOrGetter, ShallowRef } from 'vue'
33
import { containsProp, createEventHook, toRef, until, useTimeoutFn } from '@vueuse/shared'
44
import { computed, isRef, readonly, shallowRef, toValue, watch } from 'vue'
55
import { defaultWindow } from '../_configurable'

‎packages/core/useFileSystemAccess/index.ts

Copy file name to clipboardExpand all lines: packages/core/useFileSystemAccess/index.ts
+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import type { Awaitable, MaybeRefOrGetter } from '@vueuse/shared'
2-
import type { ComputedRef, ShallowRef } from 'vue'
1+
import type { Awaitable } from '@vueuse/shared'
2+
import type { ComputedRef, MaybeRefOrGetter, ShallowRef } from 'vue'
33
import type { ConfigurableWindow } from '../_configurable'
44
import { computed, shallowRef, toValue, watch } from 'vue'
55
import { defaultWindow } from '../_configurable'

‎packages/core/useImage/index.ts

Copy file name to clipboardExpand all lines: packages/core/useImage/index.ts
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { MaybeRefOrGetter } from '@vueuse/shared'
1+
import type { MaybeRefOrGetter } from 'vue'
22
import type { UseAsyncStateOptions } from '../useAsyncState'
33
import { toValue, watch } from 'vue'
44
import { useAsyncState } from '../useAsyncState'

‎packages/core/useInfiniteScroll/index.ts

Copy file name to clipboardExpand all lines: packages/core/useInfiniteScroll/index.ts
+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import type { Awaitable, MaybeRefOrGetter } from '@vueuse/shared'
2-
import type { UnwrapNestedRefs } from 'vue'
1+
import type { Awaitable } from '@vueuse/shared'
2+
import type { MaybeRefOrGetter, UnwrapNestedRefs } from 'vue'
33
import type { UseScrollOptions } from '../useScroll'
44
import { tryOnUnmounted } from '@vueuse/shared'
55
import { computed, ref as deepRef, nextTick, reactive, toValue, watch } from 'vue'

‎packages/core/useIntersectionObserver/index.ts

Copy file name to clipboardExpand all lines: packages/core/useIntersectionObserver/index.ts
+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import type { MaybeRefOrGetter, Pausable } from '@vueuse/shared'
2-
import type { ComputedRef } from 'vue'
1+
import type { Pausable } from '@vueuse/shared'
2+
import type { ComputedRef, MaybeRefOrGetter } from 'vue'
33
import type { ConfigurableWindow } from '../_configurable'
44
import type { MaybeComputedElementRef, MaybeElement } from '../unrefElement'
55
import { noop, notNullish, toArray, tryOnScopeDispose } from '@vueuse/shared'

‎packages/core/useMagicKeys/index.ts

Copy file name to clipboardExpand all lines: packages/core/useMagicKeys/index.ts
+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
import type { MaybeRefOrGetter } from '@vueuse/shared'
2-
import type { ComputedRef } from 'vue'
1+
import type { ComputedRef, MaybeRefOrGetter } from 'vue'
32
import { noop } from '@vueuse/shared'
43
import { computed, reactive, shallowRef, toValue } from 'vue'
54
import { defaultWindow } from '../_configurable'

‎packages/core/useMediaControls/index.ts

Copy file name to clipboardExpand all lines: packages/core/useMediaControls/index.ts
+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import type { Fn, MaybeRef, MaybeRefOrGetter } from '@vueuse/shared'
1+
import type { Fn } from '@vueuse/shared'
2+
import type { MaybeRef, MaybeRefOrGetter } from 'vue'
23
import type { ConfigurableDocument } from '../_configurable'
34
import { createEventHook, isObject, toRef, tryOnScopeDispose, watchIgnorable } from '@vueuse/shared'
45
import { ref as deepRef, shallowRef, toValue, watch, watchEffect } from 'vue'

‎packages/core/useMediaQuery/index.ts

Copy file name to clipboardExpand all lines: packages/core/useMediaQuery/index.ts
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* this implementation is original ported from https://github.com/logaretm/vue-use-web by Abdelrahman Awad */
22

3-
import type { MaybeRefOrGetter } from '@vueuse/shared'
3+
import type { MaybeRefOrGetter } from 'vue'
44
import type { ConfigurableWindow } from '../_configurable'
55
import { pxValue } from '@vueuse/shared'
66
import { computed, shallowRef, toValue, watchEffect } from 'vue'

‎packages/core/useMouse/index.ts

Copy file name to clipboardExpand all lines: packages/core/useMouse/index.ts
+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import type { ConfigurableEventFilter, MaybeRefOrGetter } from '@vueuse/shared'
1+
import type { ConfigurableEventFilter } from '@vueuse/shared'
2+
import type { MaybeRefOrGetter } from 'vue'
23
import type { ConfigurableWindow } from '../_configurable'
34
import type { Position } from '../types'
45
import { shallowRef } from 'vue'

‎packages/core/useMutationObserver/index.ts

Copy file name to clipboardExpand all lines: packages/core/useMutationObserver/index.ts
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { MaybeRefOrGetter } from '@vueuse/shared'
1+
import type { MaybeRefOrGetter } from 'vue'
22
import type { ConfigurableWindow } from '../_configurable'
33
import type { MaybeComputedElementRef, MaybeElement } from '../unrefElement'
44
import { notNullish, toArray, tryOnScopeDispose } from '@vueuse/shared'

‎packages/core/useObjectUrl/index.ts

Copy file name to clipboardExpand all lines: packages/core/useObjectUrl/index.ts
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { MaybeRefOrGetter } from '@vueuse/shared'
1+
import type { MaybeRefOrGetter } from 'vue'
22
import { tryOnScopeDispose } from '@vueuse/shared'
33
import { readonly, shallowRef, toValue, watch } from 'vue'
44

‎packages/core/useOffsetPagination/index.ts

Copy file name to clipboardExpand all lines: packages/core/useOffsetPagination/index.ts
+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
import type { MaybeRef, MaybeRefOrGetter } from '@vueuse/shared'
2-
import type { ComputedRef, Ref, UnwrapNestedRefs } from 'vue'
1+
import type { ComputedRef, MaybeRef, MaybeRefOrGetter, Ref, UnwrapNestedRefs } from 'vue'
32
import { noop, syncRef } from '@vueuse/shared'
43
import { computed, isReadonly, isRef, reactive, toValue, watch } from 'vue'
54
import { useClamp } from '../../math/useClamp'

‎packages/core/useParentElement/index.ts

Copy file name to clipboardExpand all lines: packages/core/useParentElement/index.ts
+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
import type { MaybeRefOrGetter } from '@vueuse/shared'
2-
import type { ShallowRef } from 'vue'
1+
import type { MaybeRefOrGetter, ShallowRef } from 'vue'
32
import { tryOnMounted } from '@vueuse/shared'
43
import { shallowRef, toValue, watch } from 'vue'
54
import { unrefElement } from '../unrefElement'

‎packages/core/usePointer/index.ts

Copy file name to clipboardExpand all lines: packages/core/usePointer/index.ts
+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
import type { MaybeRef } from '@vueuse/shared'
2-
import type { Ref } from 'vue'
1+
import type { MaybeRef, Ref } from 'vue'
32
import type { ConfigurableWindow } from '../_configurable'
43
import type { PointerType, Position } from '../types'
54
import { objectPick, toRefs } from '@vueuse/shared'

‎packages/core/usePointerSwipe/index.ts

Copy file name to clipboardExpand all lines: packages/core/usePointerSwipe/index.ts
+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
import type { MaybeRefOrGetter } from '@vueuse/shared'
2-
import type { ComputedRef, ShallowRef } from 'vue'
1+
import type { ComputedRef, MaybeRefOrGetter, ShallowRef } from 'vue'
32
import type { PointerType, Position } from '../types'
43
import type { UseSwipeDirection } from '../useSwipe'
54
import { toRef, tryOnMounted } from '@vueuse/shared'

‎packages/core/usePrevious/index.ts

Copy file name to clipboardExpand all lines: packages/core/usePrevious/index.ts
+1-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
/* This implementation is original ported from https://github.com/shorwood/pompaute by Stanley Horwood */
22

3-
import type { MaybeRefOrGetter } from '@vueuse/shared'
4-
import type { ShallowRef } from 'vue'
3+
import type { MaybeRefOrGetter, ShallowRef } from 'vue'
54
import { toRef } from '@vueuse/shared'
65
import { readonly, shallowRef, watch } from 'vue'
76

‎packages/core/useResizeObserver/index.ts

Copy file name to clipboardExpand all lines: packages/core/useResizeObserver/index.ts
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { MaybeRefOrGetter } from '@vueuse/shared'
1+
import type { MaybeRefOrGetter } from 'vue'
22
import type { ConfigurableWindow } from '../_configurable'
33
import type { MaybeComputedElementRef, MaybeElement } from '../unrefElement'
44
import { tryOnScopeDispose } from '@vueuse/shared'

‎packages/core/useScriptTag/index.ts

Copy file name to clipboardExpand all lines: packages/core/useScriptTag/index.ts
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { MaybeRefOrGetter } from '@vueuse/shared'
1+
import type { MaybeRefOrGetter } from 'vue'
22
import type { ConfigurableDocument } from '../_configurable'
33
import { noop, tryOnMounted, tryOnUnmounted } from '@vueuse/shared'
44
import { shallowRef, toValue } from 'vue'

‎packages/core/useScroll/index.ts

Copy file name to clipboardExpand all lines: packages/core/useScroll/index.ts
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { MaybeRefOrGetter } from '@vueuse/shared'
1+
import type { MaybeRefOrGetter } from 'vue'
22
import type { ConfigurableWindow } from '../_configurable'
33
import { noop, tryOnMounted, useDebounceFn, useThrottleFn } from '@vueuse/shared'
44
import { computed, reactive, shallowRef, toValue } from 'vue'

‎packages/core/useScrollLock/index.ts

Copy file name to clipboardExpand all lines: packages/core/useScrollLock/index.ts
+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import type { Fn, MaybeRefOrGetter } from '@vueuse/shared'
1+
import type { Fn } from '@vueuse/shared'
2+
import type { MaybeRefOrGetter } from 'vue'
23
import { isIOS, toRef, tryOnScopeDispose } from '@vueuse/shared'
34
import { computed, shallowRef, toValue, watch } from 'vue'
45

‎packages/core/useSessionStorage/index.ts

Copy file name to clipboardExpand all lines: packages/core/useSessionStorage/index.ts
+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import type { MaybeRefOrGetter, RemovableRef } from '@vueuse/shared'
1+
import type { RemovableRef } from '@vueuse/shared'
2+
import type { MaybeRefOrGetter } from 'vue'
23
import type { UseStorageOptions } from '../useStorage'
34
import { defaultWindow } from '../_configurable'
45
import { useStorage } from '../useStorage'

‎packages/core/useShare/index.ts

Copy file name to clipboardExpand all lines: packages/core/useShare/index.ts
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { MaybeRefOrGetter } from '@vueuse/shared'
1+
import type { MaybeRefOrGetter } from 'vue'
22
import type { ConfigurableNavigator } from '../_configurable'
33
import { toValue } from 'vue'
44
import { defaultNavigator } from '../_configurable'

‎packages/core/useSorted/index.ts

Copy file name to clipboardExpand all lines: packages/core/useSorted/index.ts
+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
import type { MaybeRefOrGetter } from '@vueuse/shared'
2-
import type { Ref } from 'vue'
1+
import type { MaybeRefOrGetter, Ref } from 'vue'
32
import { computed, isRef, toValue, watchEffect } from 'vue'
43

54
export type UseSortedCompareFn<T = any> = (a: T, b: T) => number

‎packages/core/useSpeechRecognition/index.ts

Copy file name to clipboardExpand all lines: packages/core/useSpeechRecognition/index.ts
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// ported from https://www.reddit.com/r/vuejs/comments/jksizl/speech_recognition_as_a_vue_3_hook
22
// by https://github.com/wobsoriano
33

4-
import type { MaybeRefOrGetter } from '@vueuse/shared'
4+
import type { MaybeRefOrGetter } from 'vue'
55
import type { ConfigurableWindow } from '../_configurable'
66
import type { SpeechRecognition, SpeechRecognitionErrorEvent } from './types'
77
import { toRef, tryOnScopeDispose } from '@vueuse/shared'

‎packages/core/useSpeechSynthesis/index.ts

Copy file name to clipboardExpand all lines: packages/core/useSpeechSynthesis/index.ts
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { MaybeRef, MaybeRefOrGetter } from '@vueuse/shared'
1+
import type { MaybeRef, MaybeRefOrGetter } from 'vue'
22
import type { ConfigurableWindow } from '../_configurable'
33
import { toRef, tryOnScopeDispose } from '@vueuse/shared'
44
import { computed, shallowRef, toValue, watch } from 'vue'

‎packages/core/useStepper/index.ts

Copy file name to clipboardExpand all lines: packages/core/useStepper/index.ts
+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
import type { MaybeRef } from '@vueuse/shared'
2-
import type { ComputedRef, Ref } from 'vue'
1+
import type { ComputedRef, MaybeRef, Ref } from 'vue'
32
import { computed, ref as deepRef } from 'vue'
43

54
export interface UseStepperReturn<StepName, Steps, Step> {

‎packages/core/useStorage/index.ts

Copy file name to clipboardExpand all lines: packages/core/useStorage/index.ts
+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import type { Awaitable, ConfigurableEventFilter, ConfigurableFlush, MaybeRefOrGetter, RemovableRef } from '@vueuse/shared'
1+
import type { Awaitable, ConfigurableEventFilter, ConfigurableFlush, RemovableRef } from '@vueuse/shared'
2+
import type { MaybeRefOrGetter } from 'vue'
23
import type { ConfigurableWindow } from '../_configurable'
34
import type { StorageLike } from '../ssr-handlers'
45
import { pausableWatch, tryOnMounted } from '@vueuse/shared'

‎packages/core/useStorageAsync/index.ts

Copy file name to clipboardExpand all lines: packages/core/useStorageAsync/index.ts
+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import type { MaybeRefOrGetter, RemovableRef } from '@vueuse/shared'
1+
import type { RemovableRef } from '@vueuse/shared'
2+
import type { MaybeRefOrGetter } from 'vue'
23
import type { StorageLikeAsync } from '../ssr-handlers'
34
import type { SerializerAsync, UseStorageOptions } from '../useStorage'
45
import { watchWithFilter } from '@vueuse/shared'

‎packages/core/useStyleTag/index.ts

Copy file name to clipboardExpand all lines: packages/core/useStyleTag/index.ts
+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
import type { MaybeRef } from '@vueuse/shared'
2-
import type { ShallowRef } from 'vue'
1+
import type { MaybeRef, ShallowRef } from 'vue'
32
import type { ConfigurableDocument } from '../_configurable'
43
import { tryOnMounted, tryOnScopeDispose } from '@vueuse/shared'
54
import { readonly, shallowRef, watch } from 'vue'

‎packages/core/useSwipe/index.ts

Copy file name to clipboardExpand all lines: packages/core/useSwipe/index.ts
+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
import type { MaybeRefOrGetter } from '@vueuse/shared'
2-
import type { ComputedRef, ShallowRef } from 'vue'
1+
import type { ComputedRef, MaybeRefOrGetter, ShallowRef } from 'vue'
32
import type { ConfigurableWindow } from '../_configurable'
43
import type { Position } from '../types'
54
import { computed, reactive, shallowRef } from 'vue'

‎packages/core/useTextareaAutosize/index.ts

Copy file name to clipboardExpand all lines: packages/core/useTextareaAutosize/index.ts
+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import type { Fn, MaybeRef } from '@vueuse/shared'
2-
import type { WatchSource } from 'vue'
1+
import type { Fn } from '@vueuse/shared'
2+
import type { MaybeRef, WatchSource } from 'vue'
33
import type { ConfigurableWindow } from '../_configurable'
44
import { toRef } from '@vueuse/shared'
55
import { nextTick, shallowRef, toValue, watch } from 'vue'

‎packages/core/useThrottledRefHistory/index.ts

Copy file name to clipboardExpand all lines: packages/core/useThrottledRefHistory/index.ts
+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
import type { MaybeRef } from '@vueuse/shared'
2-
import type { Ref } from 'vue'
1+
import type { MaybeRef, Ref } from 'vue'
32
import type { UseRefHistoryOptions, UseRefHistoryReturn } from '../useRefHistory'
43
import { throttleFilter } from '@vueuse/shared'
54
import { useRefHistory } from '../useRefHistory'

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.