web-component-analyzer icon indicating copy to clipboard operation
web-component-analyzer copied to clipboard

Default Values for String Properties wraps string inside a string

Open bahrus opened this issue 5 years ago • 1 comments

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.

bahrus avatar Aug 09 '20 20:08 bahrus

Can confirm.

signal-intrusion avatar Oct 12 '20 14:10 signal-intrusion