diff options
Diffstat (limited to 'src/ts/types/comments.ts')
| -rw-r--r-- | src/ts/types/comments.ts | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/ts/types/comments.ts b/src/ts/types/comments.ts index b196142..51852d0 100644 --- a/src/ts/types/comments.ts +++ b/src/ts/types/comments.ts @@ -4,6 +4,10 @@ export type CommentAuthor = { url: string; }; +export type CommentAuthorResponse = { + node: CommentAuthor; +}; + export type Comment = { approved: ''; author: CommentAuthor; @@ -11,8 +15,14 @@ export type Comment = { content: string; date: string; id: string; + parentDatabaseId: number; + replies: Comment[]; +}; + +export type RawComment = Omit<Comment, 'author'> & { + author: CommentAuthorResponse; }; export type CommentsResponse = { - nodes: Comment[]; + nodes: RawComment[]; }; |
