diff --git a/CHANGELOG.md b/CHANGELOG.md index 3f6f7db3f56..dd8ecd3fe63 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ ## [`master`](https://github.com/elastic/eui/tree/master) +- Converted `time_units` to TypeScript ([#2920](https://github.com/elastic/eui/pull/2920)) - Converted `EuiComboBox`, `EuiComboBoxInput`, `EuiComboBoxPill`, `EuiComboBoxOptionsList`, `EuiComboBoxOption`, and `EuiComboBoxTitle` to TypeScript ([#2838](https://github.com/elastic/eui/pull/2838)) - Converted `EuiCodeEditor` to TypeScript ([#2836](https://github.com/elastic/eui/pull/2836)) - Converted `EuiCode` and `EuiCodeBlock` and to TypeScript ([#2835](https://github.com/elastic/eui/pull/2835)) diff --git a/src/components/date_picker/super_date_picker/time_units.js b/src/components/date_picker/super_date_picker/time_units.ts similarity index 50% rename from src/components/date_picker/super_date_picker/time_units.js rename to src/components/date_picker/super_date_picker/time_units.ts index 9e058dcc500..7efe5e307e5 100644 --- a/src/components/date_picker/super_date_picker/time_units.js +++ b/src/components/date_picker/super_date_picker/time_units.ts @@ -1,4 +1,14 @@ -export const timeUnits = { +interface TimeUnits { + s: string; + m: string; + h: string; + d: string; + w: string; + M: string; + y: string; +} + +export const timeUnits: TimeUnits = { s: 'second', m: 'minute', h: 'hour', @@ -8,7 +18,7 @@ export const timeUnits = { y: 'year', }; -export const timeUnitsPlural = { +export const timeUnitsPlural: TimeUnits = { s: 'seconds', m: 'minutes', h: 'hours',