UNPKG

motion-v

Version:

<h1 align="center"> <img width="35" height="35" alt="Motion logo" src="https://github.com/user-attachments/assets/00d6d1c3-72c4-4c2f-a664-69da13182ffc" /><br />Motion for Vue</h1>

10 lines (9 loc) 731 B
import { InjectionKey } from 'vue'; /** * @param providerComponentName - The name(s) of the component(s) providing the context. * * There are situations where context can come from multiple components. In such cases, you might need to give an array of component names to provide your context, instead of just a single string. * * @param contextName The description for injection key symbol. */ export declare function createContext<ContextValue>(providerComponentName: string | string[], contextName?: string): readonly [<T extends ContextValue | null | undefined = ContextValue>(fallback?: T) => T extends null ? ContextValue | null : ContextValue, (contextValue: ContextValue) => ContextValue, InjectionKey<ContextValue>];