📄 useTimestamp¶
📊 Analysis Summary¶
| Metric | Count |
|---|---|
| 🔧 Functions | 2 |
| 📦 Imports | 6 |
| 📐 Interfaces | 1 |
| 📑 Type Aliases | 1 |
📚 Table of Contents¶
🛠️ File Location:¶
📂 packages/core/useTimestamp/index.ts
📦 Imports¶
| Name | Source |
|---|---|
Pausable |
@vueuse/shared |
ShallowRef |
vue |
ConfigurableScheduler |
../_configurable |
timestamp |
@vueuse/shared |
shallowRef |
vue |
useRafFn |
../useRafFn |
Functions¶
useTimestamp(options: UseTimestampOptions<false>): ShallowRef<number>¶
Reactive current timestamp.
Parameters:
optionsany: No description
See: https://vueuse.org/useTimestamp
Raw JSDoc
Internal helpers¶
Declared inside another function in this file.
update(): any¶
Returns: any
Interfaces¶
UseTimestampOptions<Controls extends boolean>¶
Interface Code
export interface UseTimestampOptions<Controls extends boolean> extends ConfigurableScheduler {
/**
* Expose more controls
*
* @default false
*/
controls?: Controls
/**
* Offset value adding to the value
*
* @default 0
*/
offset?: number
/**
* Callback on each update
*/
callback?: (timestamp: number) => void
}
Properties¶
| Name | Type | Optional | Description |
|---|---|---|---|
controls |
Controls |
✓ | not shown |
offset |
number |
✓ | not shown |
callback |
(timestamp: number) => void |
✓ | not shown |
Type Aliases¶
UseTimestampReturn<Controls extends boolean>¶
type UseTimestampReturn<Controls extends boolean> = Controls extends true
? ({ timestamp: ShallowRef<number> } & Pausable)
: ShallowRef<number>;
Generated by Syntax Scribe