mirror of
https://github.com/massbug/judge4c.git
synced 2025-05-18 07:16:34 +00:00
11 lines
325 B
TypeScript
11 lines
325 B
TypeScript
|
import prisma from "@/lib/prisma";
|
||
|
|
||
|
type ThenArg<T> = T extends PromiseLike<infer U> ? U : T;
|
||
|
|
||
|
export async function getTestcaseWithData() {
|
||
|
const testcases = await prisma.testcase.findMany({ include: { data: true } });
|
||
|
return testcases;
|
||
|
}
|
||
|
|
||
|
export type TestcaseWithData = ThenArg<ReturnType<typeof getTestcaseWithData>>;
|