Backports the following commits to 6.x: - [@kbn/datemath] improve types (#24671)
Datemath string parser used in Kibana