Giter Site home page Giter Site logo

Comments (4)

Bartvds avatar Bartvds commented on July 28, 2024

Wow, you are quick (just pushed this first version out yesterday :)

The module is a bit of a hack-job to solve acute problem, so I'm not quite sure what is wise. It might be flawed (it still has to proof itself).

This code came originally from a project that exported some methods that returned types from a external definition, so iirc I added this reference handling to solve that. But I agree this becomes messy when you start combining these bundles and they all stomp global space. Your issue hasn't come up because I re-factored that out (for other reasons).

I'll have to look into trying to either merge referred content into the mangled string-namespace (if that works, as node.d.ts had globals and many sub-modules). That would make it nicely self-contained.

Otherwise maybe leave them out but somehow refer them to be installed as shared type to main typings folder.

Maybe it can be linked via the experimental typescript element in package.json and some added logic in what is now upcoming TSD 0.6's link-command, which can already scan package.json and update tsd.d.ts with paths, so it might as well pull some shared dependencies.

Alternately it might relate to tsd.json somehow. But it goes a bit far to pull all of that as much of what is in there could be internals (or just for test suite stuff that doesn't relate to the package).

Let's think about this. I'm a bit distracted atm and knee deep in some other project. The problem is real enough though.

from dts-bundle.

poelstra avatar poelstra commented on July 28, 2024

Thanks for the quick response!
I'll make some kind of option to exclude external modules and send you a PR later.

from dts-bundle.

Bartvds avatar Bartvds commented on July 28, 2024

Very cool.

If it is active then maybe stash the omitted data in an collection we can later see if we can do something fancy with it.

from dts-bundle.

poelstra avatar poelstra commented on July 28, 2024

PR #3 adds support for excluding external typings (enabled by default).

As you requested, it also outputs a list of 'dependencies' as comments at the top of the generated output file (and in the verbose output).

from dts-bundle.

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.