The function rookFileOf in src/chessground/premove.ts uses a Key in the map function and apparently this is causing builds to fail for me.
This line:
.map((key: Key) => util.key2pos(key)[0])
Results in this:
Error TS2345: Argument of type '(key: Key) => Coord' is not assignable to parameter of type '(value: string, index: number, array: string[]) => Coord'.
Types of parameters 'key' and 'value' are incompatible.
Type 'string' is not assignable to type 'Key'.
This is on MacOS. I've tried with the latest version of TypeScript, the minimum recommended version, and older versions.
The function rookFileOf in src/chessground/premove.ts uses a Key in the map function and apparently this is causing builds to fail for me.
This line: .map((key: Key) => util.key2pos(key)[0])
Results in this: Error TS2345: Argument of type '(key: Key) => Coord' is not assignable to parameter of type '(value: string, index: number, array: string[]) => Coord'. Types of parameters 'key' and 'value' are incompatible. Type 'string' is not assignable to type 'Key'.
This is on MacOS. I've tried with the latest version of TypeScript, the minimum recommended version, and older versions.