Git Product home page Git Product logo

Comments (1)

timocov avatar timocov commented on May 29, 2024

Hi!

Why is the library added via reference, the documentation states "By default all libraries will be imported (except inlined)"?

It's correct behavior because this library has typing from @types/ and that libraries has additional special syntax to using (via triple-slash directive). So by default for such libraries I use this syntax instead of importing. But you can override this behavior via --external-imports (see #27) (and actually you did it).

And why does the check fail?

This happens because three package export Vector3, so you need to import this library instead of referencing it via reference types directive.

so the check is probably right.

Yes, sure.

it should indeed be from 'three' and not from '@types/three'.

Yes, you are absolutely right.

Exactly the same output as before. Next try:

Actually this try should provide you correct typings, but there is a small bug. I'll fix it.

Library "webvr-api" will be added via reference directive

This happens because typings for this library has extending the Window interface, so we cannot determine whether it is used in your typings or not (I'm not sure whether we can do it or not, but for now we don't). To prevent this you need to set --external-types to an empty array (or array without this library).

Thank you for reporting!

from dts-bundle-generator.

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.