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

Possible to mark typedef / interface properties as readonly? #136

Open
thw0rted opened this issue Jun 3, 2020 · 2 comments
Open

Possible to mark typedef / interface properties as readonly? #136

thw0rted opened this issue Jun 3, 2020 · 2 comments

Comments

@thw0rted
Copy link

thw0rted commented Jun 3, 2020

This is valid Typescript:

interface Foo {
  readonly bar: string;
}
type Baz = {
  readonly catz: number;
};

I know JSDoc has a @readonly tag but I can't find any examples of applying it to individual properties on a @typedef or @interface, or sub-properties of an object using dot notation ({string} options.bar).

If this isn't already possible with JSDoc, should I ask on their tracker instead?

@englercj
Copy link
Owner

englercj commented Jun 3, 2020

If there is a jsdoc syntax we don't support I'd open an issue here. If you're asking what the jsdoc syntax is, then I'm not sure. Opening an issue there might help.

@thw0rted
Copy link
Author

thw0rted commented Jun 3, 2020

I opened jsdoc/jsdoc#1793, we'll see what they say.

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