diff --git a/packages/gantt/src/i18n/i18n.ts b/packages/gantt/src/i18n/i18n.ts index 6db24e52..8b26e134 100644 --- a/packages/gantt/src/i18n/i18n.ts +++ b/packages/gantt/src/i18n/i18n.ts @@ -1,5 +1,5 @@ import { InjectionToken } from '@angular/core'; -import { Locale as DateFnsLocale } from 'date-fns'; +import type { Locale as DateFnsLocale } from 'date-fns'; import { GanttViewType } from '../class'; export enum GanttI18nLocale { diff --git a/packages/gantt/src/i18n/locales/de-de.ts b/packages/gantt/src/i18n/locales/de-de.ts index 3b5294a0..5924aa5b 100644 --- a/packages/gantt/src/i18n/locales/de-de.ts +++ b/packages/gantt/src/i18n/locales/de-de.ts @@ -1,10 +1,11 @@ import { de } from 'date-fns/locale'; +import type { Locale as DateFnsLocale } from 'date-fns'; import { GanttViewType } from '../../class'; import { GanttI18nLocale } from '../i18n'; export default { id: GanttI18nLocale.deDe, - dateLocale: de, + dateLocale: de as DateFnsLocale, views: { [GanttViewType.hour]: { label: 'Stündlich', diff --git a/packages/gantt/src/i18n/locales/ru-ru.ts b/packages/gantt/src/i18n/locales/ru-ru.ts index 0eea054d..ef3a798b 100644 --- a/packages/gantt/src/i18n/locales/ru-ru.ts +++ b/packages/gantt/src/i18n/locales/ru-ru.ts @@ -1,10 +1,11 @@ import { ru } from 'date-fns/locale'; +import type { Locale as DateFnsLocale } from 'date-fns'; import { GanttViewType } from '../../class'; import { GanttI18nLocale } from '../i18n'; export default { id: GanttI18nLocale.ruRu, - dateLocale: ru, + dateLocale: ru as DateFnsLocale, views: { [GanttViewType.hour]: { label: 'Ежечасно', diff --git a/packages/gantt/src/utils/date.ts b/packages/gantt/src/utils/date.ts index b4d908b5..d890cf01 100644 --- a/packages/gantt/src/utils/date.ts +++ b/packages/gantt/src/utils/date.ts @@ -30,10 +30,9 @@ import { startOfHour, endOfHour, endOfMinute, - Locale, - FirstWeekContainsDate + Locale } from 'date-fns'; - +import type { FirstWeekContainsDate } from 'date-fns/types'; import { TZDate } from '@date-fns/tz'; export {