Skip to content

Commit

Permalink
feat(az-list): add AZListSortOptions type
Browse files Browse the repository at this point in the history
  • Loading branch information
ghoshRitesh12 committed Dec 21, 2024
1 parent eb352f0 commit 78d9adc
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/hianime/types/anime.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import type { AZ_LIST_SORT_OPTIONS } from "../../utils/constants.js";

export type Anime = {
id: string | null;
name: string | null;
Expand Down Expand Up @@ -103,6 +105,12 @@ export type SubEpisode = {
export type DubEpisode = SubEpisode;
export type RawEpisode = SubEpisode;

type ObjectToSumType<Obj> = {
[K in keyof Obj]: Obj[K] extends Readonly<Obj[K]> ? K : never;
}[keyof Obj];

export type AZListSortOptions = ObjectToSumType<typeof AZ_LIST_SORT_OPTIONS>;

export type AnimeCategories =
| "most-favorite"
| "most-popular"
Expand Down

0 comments on commit 78d9adc

Please sign in to comment.