Skip to content

Commit

Permalink
fix(date): update Locale interface according to [email protected]
Browse files Browse the repository at this point in the history
  • Loading branch information
eikeland committed Apr 8, 2024
1 parent 2b3c770 commit e2f8cdd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/date/src/daterange/element.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { html, LitElement, PropertyValues, TemplateResult } from 'lit';
import { property } from 'lit/decorators.js';
import { ifDefined } from 'lit/directives/if-defined.js';
import { formatDistance, formatRelative } from 'date-fns';
import { enGB } from 'date-fns/locale';
import { enGB, type Locale } from 'date-fns/locale';
import { DateRangeVariant, DateTimeFormat, WeekDay } from '../types';
import { dateConverter, resolveLocale } from '../utils';

Expand Down
1 change: 1 addition & 0 deletions packages/date/src/utils/resolve-locale.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import * as locales from 'date-fns/locale';
import type { Locale } from 'date-fns/locale';

export const resolveLocale = (localeName: string): Locale => {
return locales[localeName as keyof typeof locales];
Expand Down

0 comments on commit e2f8cdd

Please sign in to comment.