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

Constructor parameters with readonly flag define properties. #584

Merged

Conversation

lddubeau
Copy link
Contributor

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

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.
Copy link
Collaborator

@aciccarello aciccarello left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work! I didn't even know TypeScript allowed that on constructor params. Thanks for adding the test case too.

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 this pull request may close these issues.

Support "readonly" as a parameter property.
3 participants