Code Monkey home page Code Monkey logo

Comments (4)

brettwillis avatar brettwillis commented on June 5, 2024 1

@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. πŸ‘πŸΌ

from date-fns-tz.

marnusw avatar marnusw commented on June 5, 2024

@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?

from date-fns-tz.

brettwillis avatar brettwillis commented on June 5, 2024

@marnusw yes just tested the typings in 3.0.1-beta.0 work great. Thanks for the quick turn-around!

from date-fns-tz.

marnusw avatar marnusw commented on June 5, 2024

Thanks for the feedback @brettwillis. 3.0.1 published.

from date-fns-tz.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.