TS types and TypeBox schemas for Cthunline games
npm i @cthunline/games
import { callOfCthulhu, CoCCharacter } from '@cthunline/games';
import { Value } from '@sinclair/typebox/value';
// Check character data validity against schema
Value.Check(callOfCthulhu.schema, data);
// Use the default character object to initialise a new character
const newCharacter = { ...callOfCthulhu.default };
// Use TS types to type character objects
const character: CoCCharacter = {
// ...
};