Skip to content

Conversation

@dkopitsa
Copy link

This PR fixes the incorrect TypeScript type reference in the locale definition and date utils files that caused build errors when using the library with date-fns@4, Angular ≥ 18 and without "skipLibCheck": true

date-fns@4 no longer exports Locale from date-fns/locale, TypeScript (and Angular’s ng-packagr) produce a type error during library build:

TS2694: Namespace '"date-fns/locale"' has no exported member 'Locale'.

This happened because TypeScript inferred the type of the locale object (ru, de) from an internal Locale symbol inside date-fns/locale, which is not part of the public API.

Fixes #544

@dkopitsa dkopitsa changed the title fix(types): Fix type errors with date-fns v4 #1 fix(types): Fix type errors with date-fns v4 Nov 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Error when installing @worktile/gantt library on Angular due to missing exports from date-fns

1 participant