runem / web-component-analyzer

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

Default Values for String Properties wraps string inside a string #179

Open bahrus opened 4 years ago

bahrus commented 4 years ago

I'm noticing a slight change in default value output with the latest release (I may have skipped over a couple releases, so not exactly sure which one saw the change):

Default values is now wrapping string inside string.

I.e.

class MyCustomElement extends HTMLElement{
  myProp = 'myProp'
}

produces:

      "properties": [
        {
          "name": "myProp",
          "type": "string",
          "default": "\"myVal\""
        }
      ]

rather than what I was getting before:

      "properties": [
        {
          "name": "myProp",
          "type": "string",
          "default": "myVal"
        }
      ]

Is it deliberate to wrap string default values like this? If so, that's fine, I'll make the needed adjustments. But just wanted to make sure first.

Thanks again for this nice tool.

signal-intrusion commented 4 years ago

Can confirm.