File tree Expand file tree Collapse file tree 6 files changed +5
-12
lines changed
Expand file tree Collapse file tree 6 files changed +5
-12
lines changed Original file line number Diff line number Diff line change 11import { gql } from "code-tag" ;
2- import type { Unwrap } from "../types" ;
32import type { GithubBlog } from "../github-blog" ;
43import { GithubQueryParams } from "../utils/github-query" ;
54import { PagerParams } from "../utils/pager" ;
@@ -73,4 +72,4 @@ export const getComments = (blog: GithubBlog) => async (params: GetCommentsParam
7372
7473export type GetComments = ReturnType < typeof getComments > ;
7574
76- export type GetCommentsResult = Unwrap < ReturnType < GetComments > > ;
75+ export type GetCommentsResult = Awaited < ReturnType < GetComments > > ;
Original file line number Diff line number Diff line change 11import { gql } from "code-tag" ;
22import type { GithubBlog } from "../github-blog" ;
3- import type { Unwrap } from "../types" ;
43import { isNonNull } from "../utils/func" ;
54import { PagerParams } from "../utils/pager" ;
65import { Label } from "../datatypes/Label" ;
@@ -70,4 +69,4 @@ export const getLabels = (blog: GithubBlog) => async (params?: GetLabelsParams)
7069
7170export type GetLabels = ReturnType < typeof getLabels > ;
7271
73- export type GetLabelsResult = Unwrap < ReturnType < GetLabels > > ;
72+ export type GetLabelsResult = Awaited < ReturnType < GetLabels > > ;
Original file line number Diff line number Diff line change 11import { gql } from "code-tag" ;
2- import type { Unwrap } from "../types" ;
32import type { GithubBlog } from "../github-blog" ;
43import { isNonNull } from "../utils/func" ;
54import { PostReduced } from "../datatypes/PostReduced" ;
@@ -40,4 +39,4 @@ export const getPinnedPosts = (blog: GithubBlog) => async () => {
4039
4140export type GetPinnedPosts = ReturnType < typeof getPinnedPosts > ;
4241
43- export type GetPinnedPostsResult = Unwrap < ReturnType < GetPinnedPosts > > ;
42+ export type GetPinnedPostsResult = Awaited < ReturnType < GetPinnedPosts > > ;
Original file line number Diff line number Diff line change 11import { gql } from "code-tag" ;
2- import type { Unwrap } from "../types" ;
32import type { GithubBlog } from "../github-blog" ;
43import { Post } from "../datatypes/Post" ;
54import { GithubQueryParams } from "../utils/github-query" ;
@@ -38,4 +37,4 @@ export const getPost = (blog: GithubBlog) => async (params: GetPostParams) => {
3837
3938export type GetPost = ReturnType < typeof getPost > ;
4039
41- export type GetPostResult = Unwrap < ReturnType < GetPost > > ;
40+ export type GetPostResult = Awaited < ReturnType < GetPost > > ;
Original file line number Diff line number Diff line change 11import { gql } from "code-tag" ;
2- import type { Unwrap } from "../types" ;
32import type { GithubBlog } from "../github-blog" ;
43import { GithubQueryParams } from "../utils/github-query" ;
54import { isNonNull } from "../utils/func" ;
@@ -65,4 +64,4 @@ export const getPosts = (blog: GithubBlog) => async (params: GetPostsParams) =>
6564
6665export type GetPosts = ReturnType < typeof getPosts > ;
6766
68- export type GetPostsResult = Unwrap < ReturnType < GetPosts > > ;
67+ export type GetPostsResult = Awaited < ReturnType < GetPosts > > ;
Original file line number Diff line number Diff line change 11export * from "../__generated__/index" ;
2-
3- export type Unwrap < T > = T extends Promise < infer U > ? U : never ;
You can’t perform that action at this time.
0 commit comments