Skip to content

⬅️ Back to Table of Contents

📄 watchThrottled

📊 Analysis Summary

Metric Count
🔧 Functions 1
📦 Imports 10
📊 Variables & Constants 1
📐 Interfaces 1

📚 Table of Contents

🛠️ File Location:

📂 packages/shared/watchThrottled/index.ts

📦 Imports

Name Source
MaybeRefOrGetter vue
MultiWatchSources vue
WatchCallback vue
WatchHandle vue
WatchOptions vue
WatchSource vue
MapOldSources ../utils
MapSources ../utils
throttleFilter ../utils
watchWithFilter ../watchWithFilter

Variables & Constants

Name Type Kind Value Exported
throttledWatch { <T, Immediate extends Readonly<bool... const watchThrottled

Functions

watchThrottled(source: WatchSource<T>, cb: WatchCallback<T, Immediate extends true…, options: WatchThrottledOptions<Immediate>): WatchHandle

Parameters:

  • source WatchSource<T>
  • cb WatchCallback<T, Immediate extends true ? T | undefined : T>
  • options WatchThrottledOptions<Immediate>

Returns: WatchHandle

Code
export function watchThrottled<T, Immediate extends Readonly<boolean> = false>(
  source: WatchSource<T>,
  cb: WatchCallback<T, Immediate extends true ? T | undefined : T>,
  options?: WatchThrottledOptions<Immediate>,
): WatchHandle

Interfaces

WatchThrottledOptions<Immediate>

Interface Code
export interface WatchThrottledOptions<Immediate> extends WatchOptions<Immediate> {
  throttle?: MaybeRefOrGetter<number>
  trailing?: boolean
  leading?: boolean
}

Properties

Name Type Optional Description
throttle MaybeRefOrGetter<number> not shown
trailing boolean not shown
leading boolean not shown

Generated by Syntax Scribe