Skip to content

Commit

Permalink
chore(typegen): 🤖 ✨ (#24)
Browse files Browse the repository at this point in the history
Co-authored-by: ecospark[bot] <128108030+ecospark[bot]@users.noreply.github.com>
  • Loading branch information
ecospark[bot] authored Nov 21, 2024
1 parent c19f93a commit 3ab7015
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions next-14/sanity.types.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Query TypeMap
import '@sanity/client'

/**
* ---------------------------------------------------------------------------------
* This file has been generated by Sanity TypeGen.
Expand Down Expand Up @@ -166,3 +169,33 @@ export type AllSanitySchemaTypes =
| Slug
| Theme
export declare const internalGroqTypeReferenceTo: unique symbol
// Source: ./src/app/layout.tsx
// Variable: THEME_QUERY
// Query: *[_id == "theme"][0]{background,text,"fetchedAt": dateTime(now())}
export type THEME_QUERYResult =
| {
background: null
text: null
fetchedAt: string | null
}
| {
background: string | null
text: string | null
fetchedAt: string | null
}
| null

// Source: ./src/app/page.tsx
// Variable: DEMO_QUERY
// Query: *[_type == "demo" && slug.current == $slug][0]{title,"fetchedAt": dateTime(now())}
export type DEMO_QUERYResult = {
title: string | null
fetchedAt: string | null
} | null

declare module '@sanity/client' {
interface SanityQueries {
'*[_id == "theme"][0]{background,text,"fetchedAt": dateTime(now())}': THEME_QUERYResult
'*[_type == "demo" && slug.current == $slug][0]{title,"fetchedAt": dateTime(now())}': DEMO_QUERYResult
}
}

0 comments on commit 3ab7015

Please sign in to comment.