@tanstack/vue-router
Version:
Modern and scalable routing for Vue applications
21 lines (20 loc) • 826 B
TypeScript
import * as Vue from 'vue';
export declare const matchContext: Vue.InjectionKey<Vue.Ref<string | undefined>>;
export declare const dummyMatchContext: Vue.InjectionKey<Vue.Ref<string | undefined>>;
/**
* Provides a match ID to child components
*/
export declare function provideMatch(matchId: string | undefined): void;
/**
* Retrieves the match ID from the component tree
*/
export declare function injectMatch(): Vue.Ref<string | undefined>;
/**
* Provides a dummy match ID to child components
*/
export declare function provideDummyMatch(matchId: string | undefined): void;
/**
* Retrieves the dummy match ID from the component tree
* This only exists so we can conditionally inject a value when we are not interested in the nearest match
*/
export declare function injectDummyMatch(): Vue.Ref<string | undefined>;