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

Support "readonly" as a parameter property. #352

Closed
lddubeau opened this issue Dec 1, 2016 · 1 comment · Fixed by #584
Closed

Support "readonly" as a parameter property. #352

lddubeau opened this issue Dec 1, 2016 · 1 comment · Fixed by #584

Comments

@lddubeau
Copy link
Contributor

lddubeau commented Dec 1, 2016

Versions

typedoc: 0.5.1
typescript: 2.0.10

Steps to Reproduce

  1. Create a project with this file named test.ts:

    class Foo {
        constructor(private a: string, readonly b: string) {
        }
    }
    
    const f: Foo = new Foo("1", "2");
    
    console.log(f.b);
    
  2. Run typedoc on it.

Expected Results

The documentation should list both a and b as properties of the class Foo.

Actual Results

Only a is present as property of Foo but b is missing. (They both appear as parameters to the constructor, which is fine.)

@aciccarello
Copy link
Collaborator

Thanks @lddubeau. PRs are welcome.

lddubeau added a commit to lddubeau/typedoc that referenced this issue Aug 22, 2017
The signature ``constructor(public foo: string)`` defines a public
property corresponding to the parameter. The signature
``constructor(readonly foo: string)`` defines a public readonly
property but prior to this commit, typedoc would not show this
property in the generated documentation.

Fixes TypeStrong#352.
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

Successfully merging a pull request may close this issue.

2 participants