Fix typechecking

This commit is contained in:
Zoe Roux
2025-05-02 02:12:08 +02:00
parent 71b3ee61af
commit 379765b28f
11 changed files with 39 additions and 37 deletions
+1 -2
View File
@@ -3,7 +3,6 @@ import { Episode, SeedEpisode } from "./episode";
import type { Extra } from "./extra";
import { MovieEntry, SeedMovieEntry } from "./movie-entry";
import { SeedSpecial, Special } from "./special";
import type { UnknownEntry } from "./unknown-entry";
export const Entry = t.Union([Episode, MovieEntry, Special]);
export type Entry = Episode | MovieEntry | Special;
@@ -11,7 +10,7 @@ export type Entry = Episode | MovieEntry | Special;
export const SeedEntry = t.Union([SeedEpisode, SeedMovieEntry, SeedSpecial]);
export type SeedEntry = SeedEpisode | SeedMovieEntry | SeedSpecial;
export type EntryKind = Entry["kind"] | Extra["kind"] | UnknownEntry["kind"];
export type EntryKind = Entry["kind"] | Extra["kind"];
export * from "./episode";
export * from "./movie-entry";
-1
View File
@@ -3,7 +3,6 @@ import type { Video } from "../video";
export const dune1984Video: Video = {
id: "d1a62b87-9cfd-4f9c-9ad7-21f9b7fa6290",
slug: "dune-1984",
path: "/video/Dune_1984/Dune (1984).mkv",
rendering: "ea3a0f8f2f2c5b61a07f61e4e8d9f8e01b2b92bcbb6f5ed1151e1f61619c2c0f",
part: null,
-1
View File
@@ -3,7 +3,6 @@ import type { Video } from "~/models/video";
export const duneVideo: Video = {
id: "c9a0d02e-6b8e-4ac1-b431-45b022ec0708",
slug: "dune",
path: "/video/Dune/Dune (2021).mkv",
rendering: "f1953a4fb58247efb6c15b76468b6a9d13b4155b02094863b1a4f0c3fbb6db58",
part: null,
+4 -3
View File
@@ -4,7 +4,8 @@ import { Movie } from "./movie";
import { Serie } from "./serie";
export const Show = t.Union([
t.Composite([t.Object({ kind: t.Literal("movie") }), Movie]),
t.Composite([t.Object({ kind: t.Literal("serie") }), Serie]),
t.Composite([t.Object({ kind: t.Literal("collection") }), Collection]),
t.Intersect([t.Object({ kind: t.Literal("movie") }), Movie]),
t.Intersect([t.Object({ kind: t.Literal("serie") }), Serie]),
t.Intersect([t.Object({ kind: t.Literal("collection") }), Collection]),
]);
export type Show = typeof Show.static;
+1
View File
@@ -7,6 +7,7 @@ export const WatchlistStatus = t.UnionEnum([
"dropped",
"planned",
]);
export type WatchlistStatus = typeof WatchlistStatus.static;
export const SerieWatchStatus = t.Object({
status: WatchlistStatus,