Open nxddsnc opened 6 years ago
Ran into same issue while working on a UMD module.
After concatenating .d.ts files, resulting file has a repeating declarations like:
import ViewOptions = Backbone.ViewOptions;
These duplications needs to be dropped for the declaration to be valid
Same issue.
In my case it was caused the normalization of the absolute full
path of the same module ended up as:
C:\Users\Borewit\code\github\music-metadata-browser\node_modules\music-metadata\lib\index.d.ts
C:\Users\Borewit\code\github\music-metadata-browser\node_modules\music-metadata\lib
It looks like one of my imports ./
instead of ./index
maybe the source of the problem.
I successfully bundle multiple .d.ts files into a single file. But in the bundle.d.ts file, there are duplicated imports. In Angular4, using the bundled .d.ts file seems to be ok. But Angular5, webpack shows a duplicated identifier error. Here's my dts-bundle options:
{ name: 'babylon-juyee-engine', main:rootDir + '/dist/index.d.ts', out: rootDir + '/babylon-juyee-engine.d.ts', removeSource: true, outputAsModuleFolder: true }
And here's part of the .d.ts file with duplicated imports:import { BoundingBoxRenderer, Matrix, Scene, Engine, RenderTargetTexture, Vector3, Nullable } from 'babylonjs'; import { TargetCamera, Camera, Vector3, Vector2, AbstractMesh, Scene, Matrix, Collider } from "babylonjs"; import { Engine, Mesh, Scene, Vector3, Matrix, Node, SubMesh, _InstancesBatch, Material, Effect, Geometry, AbstractMesh, BoundingInfo, Ray, PickingInfo } from 'babylonjs'; import { Mesh, Scene, Vector3, Matrix, Node, Geometry, BoundingInfo, Ray, PickingInfo } from 'babylonjs';
There are several Vector3 and Scene imported. Is there any compile option can help me avoid duplicated imports?