Add support for @property without type
tibdex opened this issue · 2 comments
What version are you using?
2.0.0
What JSDoc comment were you trying to parse?
/**
* @typedef {Object} Point
* @property x The x coordinate of the point.
* @property y The y coordinate of the point.
*/
What Doctrine options were you using (sloppy, unwrap, etc.)?
none
What happened? Include output if possible.
The propery descriptions are lost:
{
"description": "/**",
"tags": [
{
"title": "typedef",
"description": null,
"type": {
"type": "NameExpression",
"name": "Object"
},
"name": "Point"
}
]
}
What did you expect to happen?
I'm using documentation.js with flow
annotations so my source code is actually:
/**
* @typedef {Object} Point
* @property x The x coordinate of the point.
* @property y The y coordinate of the point.
*/
type Point = {
x: number,
y: number
};
I would have liked doctrine
to keep the property descriptions in the output so that documentation.js
could merge them with the types infered from the flow
annotations.
I checked and JSDoc
3.4.3 already supports typeless properties:
A similar development has already been done for typeless @param
#16. If doctrine
also adds support for typeless @property
, it would solve the second example of: documentationjs/documentation#226.
I can see, that there is currently a test enforcing that @property
must have a type. Is it by design ? If I were to submit a PR to change this behaviour, would you be willing to merge it ?
Thanks :)
Hi,
A pull request has been made on this topic: #187
Would it be possible to have a look? @nzakas @Constellation
Thanks!
Thanks for this issue. We have decided to officially end-of-life JSDoc support in ESLint. As a result, this repository and project will no longer be maintained.
Thanks for understanding and we apologize for any inconvenience.