Matou-Garou / convex /aiTown /inputHandler.ts
Jofthomas's picture
Jofthomas HF staff
bulk
ce8b18b
raw
history blame contribute delete
333 Bytes
import { ObjectType, PropertyValidators, Value } from 'convex/values';
import type { Game } from './game';
export function inputHandler<ArgsValidator extends PropertyValidators, Return extends Value>(def: {
args: ArgsValidator;
handler: (game: Game, now: number, args: ObjectType<ArgsValidator>) => Return;
}) {
return def;
}