UNPKG

goban

Version:

[![License: Apache-2.0](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)

24 lines (23 loc) 989 B
export type GobanErrorMessageId = GobanMoveErrorMessageId | GobanIOErrorMessageId; export type GobanErrorMessageObject = GobanMoveErrorMessageObject | GobanIOErrorMessageObject; export type GobanIOErrorMessageId = "failed_to_load_sgf"; export type GobanMoveErrorMessageId = "stone_already_placed_here" | "illegal_self_capture" | "illegal_ko_move" | "illegal_board_repetition" | "move_error"; export interface GobanIOErrorMessageObject { message_id: GobanIOErrorMessageId; url: string; } export interface GobanMoveErrorMessageObject { message_id: GobanMoveErrorMessageId; move_number: number; coords: string; } export declare class GobanError extends Error { constructor(message?: string); } export declare class GobanMoveError extends GobanError { game_id: number; move_number: number; coords: string; message_id: GobanMoveErrorMessageId; constructor(game_id: number, move_number: number, coords: string, message_id: GobanMoveErrorMessageId); }