import type { BaseKey } from "../../../contexts/data/types"; import type { IResourceItem } from "../../../contexts/resource/types"; import type { Action, GoConfig as GoConfigBase } from "../../../contexts/router/types"; type ResourceWithoutId = { /** * The name or identifier of the resource. */ resource: string; action: Extract; id?: never; meta?: Record; }; type ResourceWithId = { /** * The name or identifier of the resource. */ resource: string; action: Extract; id: BaseKey; meta?: Record; }; export type Resource = ResourceWithoutId | ResourceWithId; export type GoConfigWithResource = Omit & { to?: GoConfigBase["to"] | Resource; }; export declare const useGo: () => (config: GoConfigWithResource | GoConfigBase) => string | void; /** * handle errors for resource * @internal */ export declare const handleResourceErrors: (to: Resource, resource: IResourceItem) => void; export {}; //# sourceMappingURL=index.d.ts.map