solid-services
Version:
Solid.js library adding a services layer for global shared state.
15 lines (14 loc) • 542 B
TypeScript
import { ServiceInitializer } from "./registry";
import type { Registry } from "./registry";
import { FlowComponent } from "solid-js";
export type RegistryProviderProps = {
expose?: ServiceInitializer<any>[] | boolean;
};
export declare const ServiceRegistryContext: import("solid-js").Context<Registry | undefined>;
export declare const ServiceRegistry: FlowComponent<RegistryProviderProps>;
/**
* Returns the current registry.
*
* If no registry is found, it will throw an error.
*/
export declare function useRegistry(): Registry;