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

JSDoc inaccuracy #273

Open
cspotcode opened this issue Aug 15, 2019 · 0 comments
Open

JSDoc inaccuracy #273

cspotcode opened this issue Aug 15, 2019 · 0 comments

Comments

@cspotcode
Copy link

https://github.com/tschaub/mock-fs/blob/master/lib/index.js#L118-L126

The JSDoc says that options is required, and that the properties of the options object are also required. Those properties need to be wrapped in square brackets to indicate that they're optional.

The JSDoc comments drive code intelligence in editors. Without flagging the arg and props as optional, editors will flag omissions as an error.

 * @param {Object} [options] Any filesystem options.
 * @param {boolean} [options.createCwd] Create a directory for `process.cwd()`
 *     (defaults to `true`).
 * @param {boolean} [options.createTmp] Create a directory for `os.tmpdir()`
 *     (defaults to `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