UNPKG

@datocms/cma-client

Version:
23 lines (22 loc) 977 B
import { type LocalizedFieldValue } from '../utilities/normalizedFieldValues'; import type { FloatEditorConfiguration } from './appearance/float'; import type { NumberRangeValidator } from './validators/number_range'; import type { RequiredValidator } from './validators/required'; export type FloatFieldValue = number | null; export declare function isFloatFieldValue(value: unknown): value is FloatFieldValue; export declare function isLocalizedFloatFieldValue(value: unknown): value is LocalizedFieldValue<FloatFieldValue>; export type FloatFieldValidators = { /** Value must be specified or it won't be valid */ required?: RequiredValidator; /** Accept numbers only inside a specified range */ number_range?: NumberRangeValidator; }; export type FloatFieldAppearance = { editor: 'float'; parameters: FloatEditorConfiguration; } | { /** Plugin ID */ editor: string; /** Plugin configuration */ parameters: Record<string, unknown>; };