dts-generator icon indicating copy to clipboard operation
dts-generator copied to clipboard

Module names are truncated/incomplete

Open nomaed opened this issue 8 years ago • 2 comments

I have a library that is being built as a bundle, and it is being used by other applications. When trying to generate a single d.ts file, I see that I do get all of the "declare module ...." lines, but the names are cut. In my code, I am not using modules, it's all a single module. It looks like the filename is used as the base for the declared module names.

This is what I'm getting:

  • declare module 'myLibgUtils' {... for definitions that come from file catalogUtils.ts
  • declare module 'myLibuery' {... for definitions that come from file MetricQuery.ts
  • declare module 'myLibls' {... for definitions that come from file modelUtils.ts

and shorter filename just get the name of the module I'm specifying in --name myLib.

The command I'm using: $ node node_modules/.bin/dts-generator --name myLib --project ./src/packages/framework --out lib-tmp.d.ts

Versions: dts-generator 1.7.0 node 5.11.1 typescript 1.8.10 OS 15.4.0 Darwin (OS X 10.11.4 El Capitan)

nomaed avatar May 06 '16 20:05 nomaed

Update: I cloned the project and ran it in VS-Code, and I saw that the full path names were used, no truncation happened. The difference was mainly that I specified the absolute path in the --project argument. Then I tried running CLI with absolute path, and the module names were truncated either.

I didn't see anything anywhere about a requirement for the path to be absolute though...

nomaed avatar May 06 '16 21:05 nomaed

I'm seeing similar odd behavior.

dgoldstein0 avatar Jan 05 '17 04:01 dgoldstein0