@cthunline/games
v4.1.5
Published
> TS types and [TypeBox](https://github.com/sinclairzx81/typebox) schemas for Cthunline games
Readme
Cthunline Games
TS types and TypeBox schemas for Cthunline games
Install
npm i @cthunline/gamesExample
import { callOfCthulhu, CoCCharacter } from '@cthunline/games';
import Value from '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 = {
// ...
};