Code Monkey home page Code Monkey logo

Comments (10)

robertsLando avatar robertsLando commented on July 20, 2024

Please consider opening a PR to fix this issue

from aedes.

hjdhjd avatar hjdhjd commented on July 20, 2024

As I mentioned here, and may be useful for others...this PR breaks TypeScript in straightforward use cases with simple tsconfigs.

I would suggest this PR is reverted or updated to correct the errors. Removing the code introduced in the PR fixes the issue.

from aedes.

robertsLando avatar robertsLando commented on July 20, 2024

@hjdhjd Would you like to submit a PR to fix that?

from aedes.

hjdhjd avatar hjdhjd commented on July 20, 2024

Happy to, but it would be to revert the changes made in the prior PR. If you're good with that, I will be happy to submit it.

from aedes.

robertsLando avatar robertsLando commented on July 20, 2024

isn't there a way to keep the changes and fix what's not working?

from aedes.

hjdhjd avatar hjdhjd commented on July 20, 2024

The changes are the problem - they shouldn't be there in the first place because the prior code was correct. Here's a helpful stackoverflow answer: https://stackoverflow.com/questions/55506545/export-assignment-and-exporting-types-in-typescript-ambient-module

In experimenting with aedes for a couple of days it seems many of the TypeScript typings are either incorrect or ambiguously defined. I'll take a closer look all around and put together a PR to correct some of them.

from aedes.

robertsLando avatar robertsLando commented on July 20, 2024

@hjdhjd I agree types can be imrpved a lot, go for the PR I will take a look 👍🏼

from aedes.

hjdhjd avatar hjdhjd commented on July 20, 2024

@hjdhjd I agree types can be imrpved a lot, go for the PR I will take a look 👍🏼

Submitted.

from aedes.

getlarge avatar getlarge commented on July 20, 2024

I just encountered a similar issue when trying to import in Typescript a module exported with module.exports = TheModule.
Since TheModule (in that case, ClinicBubbleprof from @clinic/bubbleprof) has no type definitions, I created them and the correct way to export it was by using export = TheModule.
Then in the TS file, the import was done with import TheModule = require('path-to-the-module');
To keep on using the import X from x syntax, i had to set esModuleInterop=true in compilerOptions.

Reference

from aedes.

robertsLando avatar robertsLando commented on July 20, 2024

@getlarge This should have been fixed by #918

from aedes.

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.