docs: add advanced skills for Vitest, Pinia, and Vue built-ins
Add comprehensive reference documentation for: - Vitest: environments, projects/workspaces, type testing, vi utilities - Pinia: HMR, Nuxt integration, SSR setup - Vue: built-in components (Transition, Teleport, Suspense, KeepAlive) and advanced directives
This commit is contained in:
44
.agents/skills/vueuse-functions/references/refManualReset.md
Normal file
44
.agents/skills/vueuse-functions/references/refManualReset.md
Normal file
@@ -0,0 +1,44 @@
|
||||
---
|
||||
category: Reactivity
|
||||
---
|
||||
|
||||
# refManualReset
|
||||
|
||||
Create a ref with manual reset functionality.
|
||||
|
||||
## Usage
|
||||
|
||||
```ts
|
||||
import { refManualReset } from '@vueuse/core'
|
||||
|
||||
const message = refManualReset('default message')
|
||||
|
||||
message.value = 'message has set'
|
||||
|
||||
message.reset()
|
||||
|
||||
console.log(message.value) // 'default message'
|
||||
```
|
||||
|
||||
## Type Declarations
|
||||
|
||||
```ts
|
||||
/**
|
||||
* Define the shape of a ref that supports manual reset functionality.
|
||||
*
|
||||
* This interface extends the standard `Ref` type from Vue and adds a `reset` method.
|
||||
* The `reset` method allows the ref to be manually reset to its default value.
|
||||
*/
|
||||
export interface ManualResetRefReturn<T> extends Ref<T> {
|
||||
reset: Fn
|
||||
}
|
||||
/**
|
||||
* Create a ref with manual reset functionality.
|
||||
*
|
||||
* @see https://vueuse.org/refManualReset
|
||||
* @param defaultValue The value which will be set.
|
||||
*/
|
||||
export declare function refManualReset<T>(
|
||||
defaultValue: MaybeRefOrGetter<T>,
|
||||
): ManualResetRefReturn<T>
|
||||
```
|
||||
Reference in New Issue
Block a user