Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Module names are truncated/incomplete #72

Open
nomaed opened this issue May 6, 2016 · 2 comments
Open

Module names are truncated/incomplete #72

nomaed opened this issue May 6, 2016 · 2 comments

Comments

@nomaed
Copy link

nomaed commented May 6, 2016

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
Copy link
Author

nomaed commented May 6, 2016

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...

@dgoldstein0
Copy link
Contributor

I'm seeing similar odd behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants