export function isValidNumberSchemaValue(value, schema) {
    return (typeof value === "number" &&
        Number.isFinite(value) &&
        (schema.jsonType !== "integer" || Number.isInteger(value)) &&
        (schema.minimum === undefined || value >= schema.minimum) &&
        (schema.maximum === undefined || value <= schema.maximum));
}
export function getExpectedNumberDescription(schema) {
    const type = schema.jsonType === "integer" ? "an integer" : "a number";
    const bounds = [
        schema.minimum === undefined ? undefined : `greater than or equal to ${schema.minimum}`,
        schema.maximum === undefined ? undefined : `less than or equal to ${schema.maximum}`
    ].filter((bound) => bound !== undefined);
    return bounds.length === 0 ? type : `${type} ${bounds.join(" and ")}`;
}
