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 with dots are broken #453

Open
nstdspace opened this issue Apr 22, 2020 · 1 comment
Open

Module names with dots are broken #453

nstdspace opened this issue Apr 22, 2020 · 1 comment

Comments

@nstdspace
Copy link

If I try to use module names with dots (to seperate them in root and submodules) I get the following error sometimes:

...GroupPlugin.js:89
str = str.replace(/(.)([A-Z])/g, (m, a, b) => a + ' ' + b.toLowerCase());
^
TypeError: Cannot read property 'replace' of undefined
at Function.getKindString ...\node_modules\typedoc\dist\lib\converter\plugins\GroupPlugin.js:89:19)
at Function.getKindSingular ...\node_modules\typedoc\dist\lib\converter\plugins\GroupPlugin.js:97:34)
at GroupPlugin.onResolve ...\node_modules\typedoc\dist\lib\converter\plugins\GroupPlugin.js:22:47)
at triggerEvents ...\node_modules\typedoc\dist\lib\utils\events.js:133:43)
at triggerApi ...\node_modules\typedoc\dist\lib\utils\events.js:110:13)
at eventsApi ...\node_modules\typedoc\dist\lib\utils\events.js:21:18)
at Converter.trigger ...\node_modules\typedoc\dist\lib\utils\events.js:264:13)
at Converter.resolve ...\node_modules\typedoc\dist\lib\converter\converter.js:170:18)
at Converter.convert ...\node_modules\typedoc\dist\lib\converter\converter.js:91:30)
at CliApplication.convert ...\mtsm-webapp\node_modules\typedoc\dist\lib\application.js:70:39)

I think this has something to do with the order in which the files are processed. for example, If I create the following files:

A1.ts

/**
* @packageDocumentation
* @module foo
*/
export class A1 {}

A2.ts

/**
* @packageDocumentation
* @module foo.bar
*/
export class A2 {}

Then everything works as expected. If I change the order of the module declerations (i.e. foo.bar in A1 and foo in A2) the error mentioned above occurs.

@christopherthielen
Copy link
Owner

Can you provide more information? What version of typedoc? What version of the plugin? Can you try updating both and tell me if the problem persists? I released https://github.com/christopherthielen/typedoc-plugin-external-module-name/releases/tag/4.0.0 recently

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

No branches or pull requests

2 participants