♻️ use fancy new typescript utils

This commit is contained in:
platane
2022-03-25 10:32:08 +01:00
parent 9c881735b7
commit 58176f658e

View File

@@ -124,8 +124,6 @@ const getSvgPosition = (
return p;
};
type ThenArg<T> = T extends PromiseLike<infer U> ? U : T;
export type Res = ThenArg<ReturnType<typeof getGithubUserContribution>>;
export type Res = Awaited<ReturnType<typeof getGithubUserContribution>>;
export type Cell = Res["cells"][number];