mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-05-31 04:04:21 -04:00
Fix typescript compilation
This commit is contained in:
parent
6402b3cae6
commit
0a1ca61dfb
@ -16,7 +16,8 @@ export const BaseEntry = () =>
|
|||||||
nextRefresh: t.String({ format: "date-time" }),
|
nextRefresh: t.String({ format: "date-time" }),
|
||||||
});
|
});
|
||||||
|
|
||||||
export const EntryTranslation = () => t.Object({
|
export const EntryTranslation = () =>
|
||||||
name: t.Nullable(t.String()),
|
t.Object({
|
||||||
description: t.Nullable(t.String()),
|
name: t.Nullable(t.String()),
|
||||||
});
|
description: t.Nullable(t.String()),
|
||||||
|
});
|
||||||
|
@ -15,7 +15,11 @@ export const BaseEpisode = t.Intersect([
|
|||||||
BaseEntry(),
|
BaseEntry(),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
export const Episode = t.Intersect([Resource(), EntryTranslation(), BaseEpisode]);
|
export const Episode = t.Intersect([
|
||||||
|
Resource(),
|
||||||
|
EntryTranslation(),
|
||||||
|
BaseEpisode,
|
||||||
|
]);
|
||||||
export type Episode = Prettify<typeof Episode.static>;
|
export type Episode = Prettify<typeof Episode.static>;
|
||||||
|
|
||||||
export const SeedEpisode = t.Intersect([
|
export const SeedEpisode = t.Intersect([
|
||||||
|
@ -25,7 +25,11 @@ export const BaseSpecial = t.Intersect(
|
|||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
export const Special = t.Intersect([Resource(), EntryTranslation(), BaseSpecial]);
|
export const Special = t.Intersect([
|
||||||
|
Resource(),
|
||||||
|
EntryTranslation(),
|
||||||
|
BaseSpecial,
|
||||||
|
]);
|
||||||
export type Special = Prettify<typeof Special.static>;
|
export type Special = Prettify<typeof Special.static>;
|
||||||
|
|
||||||
export const SeedSpecial = t.Intersect([
|
export const SeedSpecial = t.Intersect([
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import type { Column, SQL } from "drizzle-orm";
|
import type { Column, SQL, SQLWrapper } from "drizzle-orm";
|
||||||
import { t } from "elysia";
|
import { t } from "elysia";
|
||||||
import { KErrorT } from "~/models/error";
|
import { KErrorT } from "~/models/error";
|
||||||
import { comment } from "~/utils";
|
import { comment } from "~/utils";
|
||||||
@ -8,7 +8,7 @@ import { toDrizzle } from "./to-sql";
|
|||||||
export type FilterDef = {
|
export type FilterDef = {
|
||||||
[key: string]:
|
[key: string]:
|
||||||
| {
|
| {
|
||||||
column: Column | SQL;
|
column: Column | SQLWrapper;
|
||||||
type: "int" | "float" | "date" | "string";
|
type: "int" | "float" | "date" | "string";
|
||||||
isArray?: boolean;
|
isArray?: boolean;
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import {
|
import {
|
||||||
|
type BinaryOperator,
|
||||||
type SQL,
|
type SQL,
|
||||||
and,
|
and,
|
||||||
eq,
|
eq,
|
||||||
@ -16,7 +17,7 @@ import { comment } from "~/utils";
|
|||||||
import type { FilterDef } from "./index";
|
import type { FilterDef } from "./index";
|
||||||
import type { Expression, Operator } from "./parser";
|
import type { Expression, Operator } from "./parser";
|
||||||
|
|
||||||
const opMap: Record<Operator, typeof eq> = {
|
const opMap: Record<Operator, BinaryOperator> = {
|
||||||
eq: eq,
|
eq: eq,
|
||||||
ne: ne,
|
ne: ne,
|
||||||
gt: gt,
|
gt: gt,
|
||||||
|
@ -101,7 +101,7 @@ export const getUnknowns = async (opts: {
|
|||||||
query?: string;
|
query?: string;
|
||||||
}) => {
|
}) => {
|
||||||
const resp = await app.handle(
|
const resp = await app.handle(
|
||||||
new Request(buildUrl(`unknowns`, opts), {
|
new Request(buildUrl("unknowns", opts), {
|
||||||
method: "GET",
|
method: "GET",
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user