/*! * -------------------------------------------------------------------------- * * * * Kokopu - A JavaScript/TypeScript chess library. * * * * Copyright (C) 2018-2026 Yoann Le Montagner * * * * Kokopu is free software: you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public License * * as published by the Free Software Foundation, either version 3 of * * the License, or (at your option) any later version. * * * * Kokopu is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General * * Public License along with this program. If not, see * * . * * * * -------------------------------------------------------------------------- */ import { InvalidPOJO } from '../exception'; /** * Helper class to build a {@link InvalidPOJO}. */ export declare class POJOExceptionBuilder { #private; constructor(pojo: unknown); push(fieldName: string | number): void; pop(): void; build(message: string, ...tokens: unknown[]): InvalidPOJO; } /** * Validate a string-valued field read from a POJO. */ export declare function decodeStringField(pojo: Partial>, fieldName: string, exceptionBuilder: POJOExceptionBuilder, setter: (value: string) => void): void; /** * Validate a number-valued field read from a POJO. */ export declare function decodeNumberField(pojo: Partial>, fieldName: string, exceptionBuilder: POJOExceptionBuilder, setter: (value: number) => void): void; /** * Validate a boolean-valued field read from a POJO. */ export declare function decodeBooleanField(pojo: Partial>, fieldName: string, exceptionBuilder: POJOExceptionBuilder, setter: (value: boolean) => void): void; /** * Validate an array-valued field read from a POJO. */ export declare function decodeArrayField(pojo: Partial>, fieldName: string, exceptionBuilder: POJOExceptionBuilder, setter: (value: unknown[]) => void): void; /** * Validate an object-valued field read from a POJO. */ export declare function decodeObjectField(pojo: Partial>, fieldName: string, exceptionBuilder: POJOExceptionBuilder, setter: (value: Partial>) => void): void;