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`)
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.