Skip to content

⬅️ Back to Table of Contents

📄 toObserver

📊 Analysis Summary

Metric Count
🔧 Functions 2
📦 Imports 2

📚 Table of Contents

🛠️ File Location:

📂 packages/rxjs/toObserver/index.ts

📦 Imports

Name Source
NextObserver rxjs
Ref vue

Functions

toObserver(value: Ref<T>): NextObserver<T>

Parameters:

  • value Ref<T>

Returns: NextObserver<T>

Code
export function toObserver<T>(value: Ref<T>): NextObserver<T> {
  return {
    next: (val: T) => {
      value.value = val
    },
  }
}

Internal helpers

Declared inside another function in this file.

next(val: T): void

Parameters:

  • val T

Returns: void

Code
(val: T) => {
      value.value = val
    }

Generated by Syntax Scribe