Skip to content

Commit

Permalink
type: opt lodash
Browse files Browse the repository at this point in the history
  • Loading branch information
NelsonYong committed Aug 13, 2024
1 parent 2a8fd77 commit 669fc65
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion packages/hooks/src/useKeyPress/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { ref } from 'vue'
// import { isFunction, isNumber, isString } from 'lodash'
import { BasicTarget, getTargetElement } from '../utils/domTarget'
import useDeepCompareEffectWithTarget from '../utils/useDeepCompareWithTarget'
import { isNumber, isFunction, isString } from '../utils'
Expand Down
2 changes: 1 addition & 1 deletion packages/hooks/src/useRequest/plugins/useDebouncePlugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const useDebouncePlugin: UseRequestPlugin<unknown, unknown[]> = (
fetchInstance,
{ debounceWait, debounceLeading, debounceTrailing, debounceMaxWait }
) => {
const debouncedRef = ref<DebouncedFunc<any>>();
const debouncedRef = ref<DebouncedFunc<(callback: () => void) => void>>();
const options = computed(() => {
const ret: DebounceSettings = {};
const debounceLeading_ = unref(debounceLeading)
Expand Down
2 changes: 1 addition & 1 deletion packages/hooks/src/useRequest/plugins/useThrottlePlugin.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { computed, unref, watchEffect } from 'vue'
import { DebouncedFunc, ThrottleSettings } from 'lodash'
import type { DebouncedFunc, ThrottleSettings } from 'lodash'
import throttle from 'lodash/throttle'
import { UseRequestPlugin } from '../types'

Expand Down
2 changes: 1 addition & 1 deletion packages/use-request/src/plugins/useThrottlePlugin.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { computed, unref, watchEffect } from 'vue'
import { DebouncedFunc, ThrottleSettings } from 'lodash'
import type { DebouncedFunc, ThrottleSettings } from 'lodash'
import throttle from 'lodash/throttle'
import { UseRequestPlugin } from '../types'

Expand Down

0 comments on commit 669fc65

Please sign in to comment.