⬅️ Back to Table of Contents
📄 computedInject
📊 Analysis Summary
| Metric |
Count |
| 🔧 Functions |
1 |
| 📦 Imports |
4 |
| 🟢 Vue Composition API |
2 |
| 📐 Interfaces |
2 |
| 📑 Type Aliases |
3 |
📚 Table of Contents
🛠️ File Location:
📂 packages/core/computedInject/index.ts
📦 Imports
| Name |
Source |
ComputedRef |
vue |
InjectionKey |
vue |
computed |
vue |
inject |
vue |
Vue Composition API
| Name |
Type |
Reactive Variables |
Composables |
computed |
computed |
none |
none |
computed |
computed |
none |
none |
Functions
computedInject(key: InjectionKey<T> | string, getter: ComputedInjectGetter<T, K>): ComputedRef<K | undefined>
Parameters:
key InjectionKey<T> | string
getter ComputedInjectGetter<T, K>
Returns: ComputedRef<K | undefined>
Code
export function computedInject<T, K = any>(
key: InjectionKey<T> | string,
getter: ComputedInjectGetter<T, K>,
): ComputedRef<K | undefined>
Interfaces
WritableComputedInjectOptions<T, K>
Interface Code
export interface WritableComputedInjectOptions<T, K> {
get: ComputedInjectGetter<T, K>
set: ComputedInjectSetter<K>
}
Properties
| Name |
Type |
Optional |
Description |
get |
ComputedInjectGetter<T, K> |
✗ |
not shown |
set |
ComputedInjectSetter<K> |
✗ |
not shown |
WritableComputedInjectOptionsWithDefault<T, K>
Interface Code
export interface WritableComputedInjectOptionsWithDefault<T, K> {
get: ComputedInjectGetterWithDefault<T, K>
set: ComputedInjectSetter<K>
}
Properties
| Name |
Type |
Optional |
Description |
get |
ComputedInjectGetterWithDefault<T, K> |
✗ |
not shown |
set |
ComputedInjectSetter<K> |
✗ |
not shown |
Type Aliases
ComputedInjectGetter<T, K>
type ComputedInjectGetter<T, K> = (source: T | undefined, oldValue?: K) => K;
ComputedInjectGetterWithDefault<T, K>
type ComputedInjectGetterWithDefault<T, K> = (source: T, oldValue?: K) => K;
ComputedInjectSetter<T>
type ComputedInjectSetter<T> = (v: T) => void;
Generated by Syntax Scribe