import type { FetchHookOptions, HookResponse } from './types.js'; import { FetchResponse, PostEntity } from '../../data/index.js'; import { PostOrPostsFetchStrategy, PostOrPostsParams, PostOrPostsFetchStrategyResult } from '../../data/strategies/PostOrPostsFetchStrategy.js'; export interface usePostOrPostResponse extends HookResponse { data: { post?: T; posts?: T[]; }; isSingle: boolean; isArchive: boolean; } /** * The useFetchPost hook. Returns a single post entity * * See {@link usePost} for usage instructions. * * @param params The list of params to pass to the fetch strategy. It overrides the ones in the URL. * @param options The options to pass to the swr hook. * @param path The path of the url to get url params from. * * @module useFetchPost * @category Data Fetching Hooks */ export declare function useFetchPostOrPosts(params?: Partial

, options?: FetchHookOptions>>, path?: string): usePostOrPostResponse; /** * @internal */ export declare namespace useFetchPostOrPosts { const fetcher: = PostOrPostsFetchStrategyResult>(sourceUrl?: string, defaultParams?: P) => PostOrPostsFetchStrategy; }