iking-vue-hooks
Version:
金合Vue Hooks 事件监听hook
11 lines (10 loc) • 378 B
TypeScript
import { InjectionKey } from 'vue';
export interface CreateContextOptions {
readonly?: boolean;
createProvider?: boolean;
native?: boolean;
}
export declare function createContext<T>(context: any, key?: InjectionKey<T>, options?: CreateContextOptions): {
state: any;
};
export declare function useContext<T>(key: InjectionKey<T>, native?: boolean): T;