The comment is not added to the resulting markdown output.
☠ Failing usecase:» file: src/first-compo.js
import { html, css, LitElement } from 'lit-element';
@customElement('first-compo')
export class FirstCompo extends LitElement {
static get properties() {
return {
/**
* This is my comment for the property `foo`
*/
foo: {
type: String,
},
};
}
constructor() {
this.foo = "init foo";
}
✓ Working usecase 1:
static get properties() {
return {
/**
* This is my comment for the property `foo`
*/
foo: {
type: String,
},
};
}
constructor() {
// initialization removed
}
Here the This is my comment for the property foo will be used
✓ Working usecase 2:
static get properties() {
return {
/**
* This is my comment for the property `foo`
*/
foo: {
type: String,
},
};
}
constructor() {
/**
* My comment for foo in the constructor
*/
this.foo = "something"
}
Here, the My comment for foo in the constructor will be used
It seems that if
there is no initialization (this.foo = ...) in the constructor of a property, the comment of the properties is added correctly
there is the comment in the constructor, the comment from the constructor is added correctly and the comment of the properties is ignored.
there is a comment in the properties and an initialization without a comment, the comment is not added at all
I would suggest to use the comment from the properties instead of nothing.
The
comment
is not added to the resulting markdown output.☠ Failing usecase: » file: src/first-compo.js
✓ Working usecase 1:
Here the
This is my comment for the property foo
will be used✓ Working usecase 2:
Here, the
My comment for foo in the constructor
will be usedIt seems that if
this.foo = ...
) in the constructor of a property, the comment of the properties is added correctlyI would suggest to use the comment from the properties instead of nothing.