Giter Site home page Giter Site logo

Comments (7)

SamVerschueren avatar SamVerschueren commented on May 16, 2024

If you want that in CJS, you need to use require('ow').default. It's not possible (as far as I know) to make the type definitions work with CJS and ESM. If you know of a way, please let us know and we would be happy to fix it.

from ow.

sudo-suhas avatar sudo-suhas commented on May 16, 2024

I see. Thanks anyway.

from ow.

sindresorhus avatar sindresorhus commented on May 16, 2024

@sudo-suhas Please do open a VSCode issue about this and link to this issue. It seems like something VSCode should support without having to use .default.

from ow.

SamVerschueren avatar SamVerschueren commented on May 16, 2024

It's rather a typescript (language server) issue I guess.

from ow.

sudo-suhas avatar sudo-suhas commented on May 16, 2024

@sindresorhus I have reported the issue to VSCode - microsoft/vscode#49872.

@SamVerschueren The folks at VSCode usually move the issue to the Typescript repo if it needs to be addressed there. Let us see.

from ow.

sudo-suhas avatar sudo-suhas commented on May 16, 2024

Would the change suggested in microsoft/vscode#49872 (comment) be welcome?

from ow.

SamVerschueren avatar SamVerschueren commented on May 16, 2024

Does that work? See my comment in the thread. I believe it breaks for ESM.

from ow.

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.