diff options
Diffstat (limited to 'src/ts/types/blog.ts')
| -rw-r--r-- | src/ts/types/blog.ts | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/src/ts/types/blog.ts b/src/ts/types/blog.ts index 366231e..76eaedb 100644 --- a/src/ts/types/blog.ts +++ b/src/ts/types/blog.ts @@ -1,4 +1,8 @@ -import { ArticlePreview, ArticlePreviewResponse } from './articles'; +import { + ArticlePreview, + ArticlePreviewResponse, + ArticleSlug, +} from './articles'; import { PageInfo } from './pagination'; export type PostsListEdge = { @@ -18,7 +22,7 @@ export type PostsList = { pageInfo: PageInfo; }; -export type fetchPostsListReturn = ( +export type FetchPostsListReturn = ( first?: number, after?: string ) => Promise<PostsListResponse>; @@ -28,8 +32,16 @@ type PostsListProps = { after?: string; }; -export type getPostsListReturn = (props: PostsListProps) => Promise<PostsList>; +export type GetPostsListReturn = (props: PostsListProps) => Promise<PostsList>; export type BlogPageProps = { fallback: PostsList; }; + +export type AllPostsSlugReponse = { + posts: { + nodes: ArticleSlug[]; + }; +}; + +export type FetchAllPostsSlugReturn = () => Promise<ArticleSlug[]>; |
