Skip to content

⬅️ Back to Table of Contents

📄 watchOnce

📊 Analysis Summary

Metric Count
🔧 Functions 1
📦 Imports 8
🟢 Vue Composition API 1

📚 Table of Contents

🛠️ File Location:

📂 packages/shared/watchOnce/index.ts

📦 Imports

Name Source
MultiWatchSources vue
WatchCallback vue
WatchHandle vue
WatchOptions vue
WatchSource vue
MapOldSources ../utils
MapSources ../utils
watch vue

Vue Composition API

Name Type Reactive Variables Composables
watch watch none none

Functions

watchOnce(source: WatchSource<T>, cb: WatchCallback<T, T | undefined>, options: Omit<WatchOptions<true>, 'once'>): WatchHandle

Parameters:

  • source WatchSource<T>
  • cb WatchCallback<T, T | undefined>
  • options Omit<WatchOptions<true>, 'once'>

Returns: WatchHandle

Code
export function watchOnce<T>(
  source: WatchSource<T>,
  cb: WatchCallback<T, T | undefined>,
  options?: Omit<WatchOptions<true>, 'once'>,
): WatchHandle

Generated by Syntax Scribe