runem / web-component-analyzer

CLI that analyzes web components and emits documentation
https://runem.github.io/web-component-analyzer
MIT License
500 stars 61 forks source link

@default JSDOC always turn into string #237

Open Sarin-Udompanish opened 2 years ago

Sarin-Udompanish commented 2 years ago

Example code

  /**
   * Set the first day of the week. 0 - for Sunday, 6 - for Saturday
   * @param firstDayOfWeek The first day of the week
   * @type {number}
   * @default 0
   */
  @property({ type: Number, attribute: 'first-day-of-week' })
  public set firstDayOfWeek (firstDayOfWeek: number) {
    firstDayOfWeek %= 7;
    const oldFirstDayOfWeek = this._firstDayOfWeek;
    if (oldFirstDayOfWeek !== firstDayOfWeek) {
      this._firstDayOfWeek = firstDayOfWeek;
      this.requestUpdate('firstDayOfWeek', oldFirstDayOfWeek);
    }
  }

Expected output

Property Attribute Type Default Description
firstDayOfWeek first-day-of-week number 0 Set the first day of the week.
0 - for Sunday, 6 - for Saturday

Actual output

Property Attribute Type Default Description
firstDayOfWeek first-day-of-week number "0" Set the first day of the week.
0 - for Sunday, 6 - for Saturday
2bro-ncsoft commented 11 months ago

me too :(