As seen in https://github.com/elastic/kibana/pull/160456#pullrequestreview-1502640062, the types in TimeFilter sometimes don't match the runtime types. In some cases we are returning moment values when we should be returning strings. We should clean these up so that they actually properly reflect the runtime types.
In the end we should consolidate both InputTimeRange and TimeRange:
export type TimeRange = {
from: string;
to: string;
mode?: 'absolute' | 'relative';
};
export type InputTimeRange =
| TimeRange
| {
from: Moment;
to: Moment;
};
As seen in https://github.com/elastic/kibana/pull/160456#pullrequestreview-1502640062, the types in
TimeFilter
sometimes don't match the runtime types. In some cases we are returningmoment
values when we should be returningstring
s. We should clean these up so that they actually properly reflect the runtime types.In the end we should consolidate both
InputTimeRange
andTimeRange
: