Skip to content

⬅️ Back to Table of Contents

📄 index.ts

📊 Analysis Summary

Metric Count
🔧 Functions 1
📦 Imports 4
📐 Interfaces 1
📑 Type Aliases 1

📚 Table of Contents

🛠️ File Location:

📂 packages/shared/extendRef/index.ts

📦 Imports

Name Source
Ref vue
ShallowUnwrapRef vue
UnwrapRef vue
isRef vue

Functions

extendRef(ref: R, extend: Extend, options: Options): ShallowUnwrapRef<Extend> & R

Code
export function extendRef<R extends Ref<any>, Extend extends object, Options extends ExtendRefOptions<false>>(ref: R, extend: Extend, options?: Options): ShallowUnwrapRef<Extend> & R
  • JSDoc:

    /**
     * Overload 1: Unwrap set to false
     */
    

  • Parameters:

  • ref: R
  • extend: Extend
  • options: Options
  • Return Type: ShallowUnwrapRef<Extend> & R

Interfaces

ExtendRefOptions<Unwrap extends boolean = boolean>

Interface Code
export interface ExtendRefOptions<Unwrap extends boolean = boolean> {
  /**
   * Is the extends properties enumerable
   *
   * @default false
   */
  enumerable?: boolean

  /**
   * Unwrap for Ref properties
   *
   * @default true
   */
  unwrap?: Unwrap
}

Properties

Name Type Optional Description
enumerable boolean
unwrap Unwrap

Type Aliases

ExtendRefReturn<T = any = any>

type ExtendRefReturn<T = any = any> = Ref<T>;