Skip to content

Commit

Permalink
fix(useDebounce): make return type readonly, close #407 (#435)
Browse files Browse the repository at this point in the history
  • Loading branch information
wheatjs committed Apr 8, 2021
1 parent 3d720c0 commit 715d5b5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/shared/useDebounce/index.ts
@@ -1,7 +1,7 @@
import { ref, Ref, watch } from 'vue-demi'
import { useDebounceFn } from '../useDebounceFn'

export function useDebounce<T>(value: Ref<T>, ms = 200): Ref<T> {
export function useDebounce<T>(value: Ref<T>, ms = 200): Readonly<Ref<T>> {
if (ms <= 0)
return value

Expand Down

0 comments on commit 715d5b5

Please sign in to comment.