Fix typescript compilation

This commit is contained in:
Zoe Roux 2025-03-01 22:53:33 +01:00
parent 6402b3cae6
commit 0a1ca61dfb
6 changed files with 20 additions and 10 deletions

View File

@ -16,7 +16,8 @@ export const BaseEntry = () =>
nextRefresh: t.String({ format: "date-time" }),
});
export const EntryTranslation = () => t.Object({
name: t.Nullable(t.String()),
description: t.Nullable(t.String()),
});
export const EntryTranslation = () =>
t.Object({
name: t.Nullable(t.String()),
description: t.Nullable(t.String()),
});

View File

@ -15,7 +15,11 @@ export const BaseEpisode = t.Intersect([
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 const SeedEpisode = t.Intersect([

View File

@ -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 const SeedSpecial = t.Intersect([

View File

@ -1,4 +1,4 @@
import type { Column, SQL } from "drizzle-orm";
import type { Column, SQL, SQLWrapper } from "drizzle-orm";
import { t } from "elysia";
import { KErrorT } from "~/models/error";
import { comment } from "~/utils";
@ -8,7 +8,7 @@ import { toDrizzle } from "./to-sql";
export type FilterDef = {
[key: string]:
| {
column: Column | SQL;
column: Column | SQLWrapper;
type: "int" | "float" | "date" | "string";
isArray?: boolean;
}

View File

@ -1,4 +1,5 @@
import {
type BinaryOperator,
type SQL,
and,
eq,
@ -16,7 +17,7 @@ import { comment } from "~/utils";
import type { FilterDef } from "./index";
import type { Expression, Operator } from "./parser";
const opMap: Record<Operator, typeof eq> = {
const opMap: Record<Operator, BinaryOperator> = {
eq: eq,
ne: ne,
gt: gt,

View File

@ -101,7 +101,7 @@ export const getUnknowns = async (opts: {
query?: string;
}) => {
const resp = await app.handle(
new Request(buildUrl(`unknowns`, opts), {
new Request(buildUrl("unknowns", opts), {
method: "GET",
}),
);