Skip to content

⬅️ Back to Table of Contents

📄 index.ts

📊 Analysis Summary

Metric Count
🔧 Functions 1
📦 Imports 7
🟢 Vue Composition API 1
📐 Interfaces 1
📑 Type Aliases 1

📚 Table of Contents

🛠️ File Location:

📂 packages/shared/useLastChanged/index.ts

📦 Imports

Name Source
ShallowRef vue
WatchOptions vue
WatchSource vue
shallowReadonly vue
shallowRef vue
watch vue
timestamp ../utils

Vue Composition API

Name Type Reactive Variables Composables
watch watch none none

Functions

useLastChanged(source: WatchSource, options: UseLastChangedOptions<false>): Readonly<ShallowRef<number | null>>

Code
export function useLastChanged(source: WatchSource, options?: UseLastChangedOptions<false>): Readonly<ShallowRef<number | null>>
  • JSDoc:

    /**
     * Records the timestamp of the last change
     *
     * @see https://vueuse.org/useLastChanged
     */
    

  • Parameters:

  • source: WatchSource
  • options: UseLastChangedOptions<false>
  • Return Type: Readonly<ShallowRef<number | null>>

Interfaces

UseLastChangedOptions<Immediate extends boolean, InitialValue extends number | null | undefined = undefined>

Interface Code
export interface UseLastChangedOptions<
  Immediate extends boolean,
  InitialValue extends number | null | undefined = undefined,
> extends WatchOptions<Immediate> {
  initialValue?: InitialValue
}

Properties

Name Type Optional Description
initialValue InitialValue

Type Aliases

UseLastChangedReturn

type UseLastChangedReturn = Readonly<ShallowRef<number | null>> | Readonly<ShallowRef<number>>;