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

[BUG] error type generated for argument of method, type mismatch #498

Closed
rdkmaster opened this issue Mar 7, 2018 · 1 comment
Closed

Comments

@rdkmaster
Copy link

Overview of the issue

Got a method with a few arguments defined as below:

public filter(term: string, fields?: (string | number)[]): void;

notice that the fields argument got a combined type (string | number)[]

And, I use compodoc to generate its meta info to a json file, I got the following data:

"jsdoctags": [
    {
        "name": "term",
        "type": "",
        "tagName": {
            "text": "param"
        }
    },
    {
        "name": "fields",
        "type": "string | number[]",
        "optional": true,
        "tagName": {
            "text": "param"
        }
    }
]

Notice that the type info string | number[] in the generated jsdoctags property is not correct. The generated type got a totally different type!

Operating System, Node.js, npm, compodoc version(s)

win7, node 6.1

Angular configuration, a package.json file in the root folder

yes

Compodoc installed globally or locally ?

globally

Motivation for or Use Case
Reproduce the error

run the following scripts in win7:

git clone https://github.com/rdkmaster/jigsaw.git
cd jigsaw
compodoc src/jigsaw -p tsconfig.json --disableSourceCode --disableGraph  --disableCoverage --disablePrivate --disableInternal --disableLifeCycleHooks --disableRoutesGraph --exportFormat json

After compodoc successfully generates the json file, open file, you can find this info near line 11185.

Related issues
Suggest a Fix
"jsdoctags": [
    ...
    {
       ...
        "type": "(string | number[])",
       ....
    }
]
@lock
Copy link

lock bot commented Sep 30, 2019

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem. Why locking ? Having issues with the most up-to-date context.

@lock lock bot locked as resolved and limited conversation to collaborators Sep 30, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants