`typings.d.ts` no longer accurate for named exports in V3
brettwillis opened this issue · 4 comments
@brettwillis I had to update the build scripts to maintain your changes. I think the individual type files next to the functions had to be changed too. (The lib really needs to be rewritten in TS properly.)
I thought it best to release 3.0.1-beta.0
first. Will you let me know if types work properly for you using this release?
@marnusw yes just tested the typings in 3.0.1-beta.0
work great. Thanks for the quick turn-around!
@marnusw actually there is a curious behaviour where if all imports in a file use ESM date-fns-tz/esm/...
then VS Code suddenly says Cannot find module 'date-fns-tz/esm/...' or its corresponding type declarations.ts(2307)
for all of them, but as soon as any import in the file refers to the root/non-ESM date-fns-tz/...
then VS Code is satisfied with all the imports.
Checked again and 3.0.0
has the same issue.
Not too sure what the root cause is there but maybe it can be resolved if rewritten in TS properly.
However at least 3.0.1-beta.0
has accurate typings. 👍🏼
Thanks for the feedback @brettwillis. 3.0.1
published.