@hizi.io/slot-types
v0.1.3
Published
Shared TypeScript type definitions for hizi slot engine configs and bet results
Downloads
370
Readme
@hizi.io/slot-types
Shared TypeScript type definitions for hizi slot engine configs and bet results. Pull this in when you're authoring a tool that generates, transforms, or consumes the JSON shapes the hizi slot engine speaks.
The package is types-only — no runtime code, no dependencies.
Install
npm install --save-dev @hizi.io/slot-typesAvailable on npm: https://www.npmjs.com/package/@hizi.io/slot-types
Usage
import type { ISlotConfig, IResult } from '@hizi.io/slot-types';
function loadConfig(json: string): ISlotConfig {
return JSON.parse(json) as ISlotConfig;
}
function summarize(result: IResult): string {
return `${result.wins.length} wins, total ${result.totalWin}`;
}Notable exports include:
ISlotConfig,ISymbol,TWinlines,TFeatures— config shapesIResult,IWin,TWins,IBoardState,ICascadeData— bet-result shapesTBoard,TStuckSymbols,TWinMode— supporting types
Build
npm install
npm run build # tsc → lib/Development
Type-check only (no emit):
npm run check # tsc --noEmitLicense
ISC
