chessground-examples
chessground-examples copied to clipboard
Update to chessground 9
I'm less than 100% on the details here, but I think this at least ballpark correct:
- these examples use chessgounnd
- there are some api / type changes between chessground 8 and 9
- so, some examples show usage that is no longer working.
A specific example: in https://github.com/lichess-org/chessground-examples/blob/d8b942d0a2d47738ba7bd1eb4e6cff9dbb84a157/src/units/svg.ts#L131, the customSvg field is being given a raw string. But in cg 9 the type of customSvg is
customSvg?: { html: string; center?: 'orig' | 'dest' | 'label' };
In the meantime, a little disclaimer in the readme to highlight the version drift could be useful.