Cleanup IFieldType type in data plugin #54894
Labels
chore
Feature:Data Views
Data Views code and UI - index patterns before 8.0
impact:low
Addressing this issue will have a low level of impact on the quality/strength of our product.
loe:small
Small Level of Effort
Team:DataDiscovery
Discover, search (e.g. data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL.
Part of #61760
I think we should do some TypeScript type cleanup on the
IFieldType
in the data plugin. It's a very central type that is/will be used in a lot of places, and I think it's currently not typed ideal.As far as I can see the
Field
class is the only implementation on it, and if we look into that, it seems that the type is overly careful:The following properties can never be
undefined
and we can remove the?
from them: aggregatable, searchable, scripted, visualizable. It also seems we now have a type forformat
.Also I wonder if we could provide a type for how the JSON inside the saved object looks. Since we're currently only support index patterns on the client side, we have a couple of places we load the index pattern saved object on the server manually, and parse the
attributes
from it. It would be good if we would have a type from the data plugin showing how the format of this is, until we're having server side index pattern support.The text was updated successfully, but these errors were encountered: