Skip to content

Commit

Permalink
chore!: change type of value argument of useV7d composable
Browse files Browse the repository at this point in the history
  • Loading branch information
NozomuIkuta committed Jan 3, 2024
1 parent 7c4fa6a commit 109687e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/vue-v8n/src/composables/useV7d.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { computed, ref, toRef, watch } from 'vue'
import type { MaybeRef, MaybeRefOrGetter } from 'vue'
import type { MaybeRefOrGetter } from 'vue'
import type { RuleDefinition, UseV7dOptions } from '../types'

export function useV7d<T>(value: MaybeRef<T>, rules: MaybeRefOrGetter<RuleDefinition[]>, options?: UseV7dOptions) {
export function useV7d<T>(value: T, rules: MaybeRefOrGetter<RuleDefinition[]>, options?: UseV7dOptions) {
const immediate = !!options?.immediate

const $el = ref<EventTarget>()
const _value = toRef(value)
const _value = ref(value)
const _rules = toRef(rules)
const _touched = ref(immediate)
const _error = ref('')
Expand Down Expand Up @@ -55,7 +55,7 @@ export function useV7d<T>(value: MaybeRef<T>, rules: MaybeRefOrGetter<RuleDefini

_error.value = ''

return _value.value as T
return _value.value
}

function $reset() {
Expand Down

0 comments on commit 109687e

Please sign in to comment.