You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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...
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 filecatalogUtils.ts
declare module 'myLibuery' {...
for definitions that come from fileMetricQuery.ts
declare module 'myLibls' {...
for definitions that come from filemodelUtils.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)
The text was updated successfully, but these errors were encountered: