Comments (1)
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)
- don't work with pnpm and turborepo HOT 11
- Inlining a library with namespaced imports/exports inlines export statements HOT 1
- Incorrect handling re-export with namespace HOT 1
- Double-underscored names aren't exported HOT 1
- It is throwing a Typescript error TS1254 when using @sinclair/typebox HOT 7
- [9.1.0+] Handling globalThis fails HOT 1
- Wildcard re-exports seem to be ignored HOT 4
- Referenced types and renamings HOT 8
- Gloabl `Map` collides with our `Map` object, I think... HOT 16
- Add warning if referenced type is not exported because it was renamed due to the name collisions
- Disable `exportReferencedTypes` option by default and throw error if referenced type is not exported because of the name collisions
- Exporting class/variable/function as type exports it as value too HOT 1
- Allow to provide a different tsconfig path for generated bundle validation
- Issue setting both `excludeInternal` and `placeInternalsInOwningModule` HOT 2
- jsdoc comments aren't renamed alogn with their nodes HOT 9
- Do not compile bundled output together as they might have incompatible global declarations
- Do not rename a node if known global name refers to this a symbol of that node
- jsdoc comments are stripped for nodes that were renamed because of the name collision
- Namespaced imports/exports don't generate a namespace if they are exported via name
- TS2307: Cannot find module *.module.css HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dts-bundle-generator.