import type { AgDataType } from './agDataType'; import type { AgAggregationFunction } from './agAggregationFunction'; import type { AgFieldDeserializer, AgFieldRole, AgFieldSerializer, AgFieldValueFormatter, AgFormat } from './agFieldDefinition'; import type { AgFormats } from './agFormats'; export type InferDataTypeFromFormat = TFormats[TFormat] extends { dataType: AgDataType; } ? TFormats[TFormat]['dataType'] : never; export interface AgFormatDefinition { /** The data type. */ dataType: TDataType; /** How fields of this format can be used within widgets. Ordered by preference. */ supportedRoles: AgFieldRole[]; /** The supported aggregations for fields of this format. */ supportedAggregations: AgAggregationFunction[]; /** How the field values will be serialized into state. */ serializer: AgFieldSerializer; /** How the field values will be deserialized from state. */ deserializer: AgFieldDeserializer; /** How the field values will be displayed. */ valueFormatter: AgFieldValueFormatter; /** How blank values will be displayed. */ blankValue: string; /** Optional. Will be passed to the value formatter. */ options?: TOptions; } export interface AgFormatOverride extends Partial, TOptions>> { }