10 lines
321 B
TypeScript
10 lines
321 B
TypeScript
import { runProgramChallenge } from "./programming.ts";
|
|
|
|
export async function runChallenge(challenge: any, problem: any, cases: any) {
|
|
switch (problem.type) {
|
|
case "programming":
|
|
return await runProgramChallenge(challenge, problem, cases)
|
|
default:
|
|
throw new Error("Unsupported problem type.")
|
|
}
|
|
} |