Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(useVModel)!: rename type VModelOptions to UseVModelOptions #1894

Merged
merged 1 commit into from Jul 13, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/core/useVModel/index.ts
Expand Up @@ -2,7 +2,7 @@ import { isDef } from '@vueuse/shared'
import type { UnwrapRef } from 'vue-demi'
import { computed, getCurrentInstance, isVue2, ref, watch } from 'vue-demi'

export interface VModelOptions<T> {
export interface UseVModelOptions<T> {
/**
* When passive is set to `true`, it will use `watch` to sync with props and ref.
* Instead of relying on the `v-model` or `.sync` to work.
Expand Down Expand Up @@ -43,7 +43,7 @@ export function useVModel<P extends object, K extends keyof P, Name extends stri
props: P,
key?: K,
emit?: (name: Name, ...args: any[]) => void,
options: VModelOptions<P[K]> = {},
options: UseVModelOptions<P[K]> = {},
) {
const {
passive = false,
Expand Down
4 changes: 2 additions & 2 deletions packages/core/useVModels/index.ts
@@ -1,5 +1,5 @@
import type { ToRefs } from 'vue-demi'
import type { VModelOptions } from '../useVModel'
import type { UseVModelOptions } from '../useVModel'
import { useVModel } from '../useVModel'

/**
Expand All @@ -12,7 +12,7 @@ import { useVModel } from '../useVModel'
export function useVModels<P extends object, Name extends string>(
props: P,
emit?: (name: Name, ...args: any[]) => void,
options: VModelOptions<any> = {},
options: UseVModelOptions<any> = {},
): ToRefs<P> {
const ret: any = {}

Expand Down