diff --git a/sanity/queries.ts b/sanity/queries.ts index 11ea9cdb..a9cca3a6 100644 --- a/sanity/queries.ts +++ b/sanity/queries.ts @@ -12,10 +12,8 @@ export const getAllLatestBlogPostSlugsQuery = () => && defined(slug.current)] | order(publishedAt desc).slug.current ` -export const getAllLatestBlogPostSlugs = () => { - // eslint-disable-next-line @typescript-eslint/ban-ts-comment - // @ts-ignore - return clientFetch(getAllLatestBlogPostSlugsQuery()) +export const getAllLatestBlogPostSlugs = (): Promise => { + return clientFetch(getAllLatestBlogPostSlugsQuery()) } type GetBlogPostsOptions = { @@ -49,10 +47,9 @@ export const getLatestBlogPostsQuery = ({ } } }` -export const getLatestBlogPosts = (options: GetBlogPostsOptions) => - // eslint-disable-next-line @typescript-eslint/ban-ts-comment - // @ts-ignore - clientFetch(getLatestBlogPostsQuery(options)) +export const getLatestBlogPosts = ( + options: GetBlogPostsOptions +): Promise => clientFetch(getLatestBlogPostsQuery(options)) export const getBlogPostQuery = groq` *[_type == "post" && slug.current == $slug && !(_id in path("drafts.**"))][0] { @@ -98,10 +95,8 @@ export const getBlogPostQuery = groq` }, } }` -export const getBlogPost = (slug: string) => - // eslint-disable-next-line @typescript-eslint/ban-ts-comment - // @ts-ignore - clientFetch(getBlogPostQuery, { slug }) +export const getBlogPost = (slug: string): Promise => + clientFetch(getBlogPostQuery, { slug }) export const getSettingsQuery = () => groq`