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

Dynamic module comments are not in generateJson() output #894

Closed
tilersmyth opened this issue Nov 1, 2018 · 2 comments
Closed

Dynamic module comments are not in generateJson() output #894

tilersmyth opened this issue Nov 1, 2018 · 2 comments
Labels
no bug This is expected behavior

Comments

@tilersmyth
Copy link

tilersmyth commented Nov 1, 2018

per #603, I have this at the top of one of my files:

/**
* @copyright <our copyright here>
*/

/** ignore this comment */
import * as _ from "lodash";

but it is not reflected in the output produced by generateJson(). Is this expected?

Here are how my options are configured:
target: "ES6",
excludeExternals: false,
ignoreCompilerErrors: true,
mode: "module",
experimentalDecorators: true

Any help would be appreciated!

@Gerrit0
Copy link
Collaborator

Gerrit0 commented Nov 2, 2018

Could you provide an example of where this fails? I just checked and was unable to reproduce with your options (after changing mode to "modules" - "module" isn't a valid value)

// File is in the root of the TypeDoc repo, I added a module comment to paths.ts for testing purposes.
const td = require('./dist');

const app = new td.Application({
    target: 'es6',
    excludeExternals: false,
    ignoreCompilerErrors: true,
    mode: 'modules',
    experimentalDecorators: true
});
const result = app.generateJson(['./src/lib/utils/paths.ts'], './test.json');
console.log(result);

This gives me the following json:

{
	"id": 0,
	"name": "typedoc",
	"kind": 0,
	"flags": {},
	"children": [
		{
			"id": 1,
			"name": "\"paths\"",
			"kind": 1,
			"kindString": "External module",
			"flags": {
				"isExported": true,
				"isExternal": true
			},
			"originalName": "src/lib/utils/paths.ts",
			"comment": {
				"shortText": "Module comment"
			},

@tilersmyth
Copy link
Author

tilersmyth commented Nov 2, 2018

Ugh, typical. Moving too fast. It was simply the fact that I used "module" instead of "modules"...

Appreciate the help.

@aciccarello aciccarello added the no bug This is expected behavior label Nov 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no bug This is expected behavior
Projects
None yet
Development

No branches or pull requests

3 participants