date-fns / utc

date-fns UTC utils
70 stars 5 forks source link

Cannot import UTCDate with typescript 5 #3

Closed gootik closed 6 months ago

gootik commented 8 months ago

Hi, I upgraded from typescript 4.9 to 5 and now we're getting this error when importing @date-fns/utc (version 1.1.0)

Type error: Could not find a declaration file for module '@date-fns/utc'. 'node_modules/@date-fns/utc/index.mjs' implicitly has an 'any' type.
  There are types at 'node_modules/@date-fns/utc/index.d.ts', but this result could not be resolved when respecting package.json "exports". The '@date-fns/utc' library may need to update its package.json or typings.

would appreciate some help if possible

kossnocorp commented 6 months ago

Fixed and shipped with @date-fns/utc@1.1.1. Thank you for reporting!