Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Empty string as default is resolved as undefined #62

Closed
fabulator opened this issue Jun 11, 2018 · 0 comments
Closed

Empty string as default is resolved as undefined #62

fabulator opened this issue Jun 11, 2018 · 0 comments

Comments

@fabulator
Copy link

I have following class:
class LocalStorage { constructor(prefix: string = '') { } }

ESdocs will describe it as:

prefix | string | optional, default: undefined

But default is not undefined, it is empty string.

When I try
class LocalStorage { constructor(prefix: string = 'x') { } }

Results is
prefix | string | optional, default: x

Which is ok. Problem is only in empty string. My config is:

{
  "source": "./src",
  "destination": "./docs",
  "excludes": ["index.js"],
  "plugins": [
    {
      "name": "esdoc-standard-plugin"
    },
    {"name": "esdoc-flow-type-plugin", "option": {"enable": true}},
    {"name": "esdoc-ecmascript-proposal-plugin", "option": {"all": true}}
  ]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant