UNPKG

@nutui/nutui

Version:

京东风格的轻量级移动端 Vue2、Vue3 组件库(支持小程序开发)

15 lines (14 loc) 490 B
import type { InjectionKey, ComponentInternalInstance } from 'vue'; type ParentProvide<T> = T & { add(child: ComponentInternalInstance): void; remove(child: ComponentInternalInstance): void; internalChildren: ComponentInternalInstance[]; }; export declare function useInject<T>(key: InjectionKey<ParentProvide<T>>): { parent: ParentProvide<T>; index: import("vue").ComputedRef<number>; } | { parent: null; index: import("vue").Ref<number, number>; }; export {};