react-docgen-typescript-loader icon indicating copy to clipboard operation
react-docgen-typescript-loader copied to clipboard

Remove quotes from default values / non-string values.

Open strothj opened this issue 6 years ago • 2 comments
trafficstars

Will default values always be surrounded by quotes? I feel for the above delay1, the default value shoudl be 250, not "250". Is it possible to accomplish that?

Originally posted by @city41 in https://github.com/strothj/react-docgen-typescript-loader/issues/5#issuecomment-506434918

strothj avatar Jun 28 '19 13:06 strothj

Currently the default values are surrounded by quotes. I'm not sure if this comes from @storybook/addon-info or if it comes from react-docgen-typescript so it will need some investigation.

strothj avatar Jun 28 '19 13:06 strothj

I've encountered this today in a different scenario using Docgen.

Strings are generated as "'string'" and numbers, booleans etc. as "20" or "true", so it's got nothing to do with the loader here.

Kosai106 avatar Jul 09 '19 20:07 Kosai106