Updated "Output options" > "comments" in README.md (#3717)
Expanded the current documentation to include: - What the value of `"some"` means based on `lib/output.js`. - Information about the `Function` overload parameters and expected output.
This commit is contained in:
10
README.md
10
README.md
@@ -848,8 +848,14 @@ can pass additional arguments that control the code output:
|
|||||||
statement.
|
statement.
|
||||||
|
|
||||||
- `comments` (default `false`) -- pass `true` or `"all"` to preserve all
|
- `comments` (default `false`) -- pass `true` or `"all"` to preserve all
|
||||||
comments, `"some"` to preserve some comments, a regular expression string
|
comments, `"some"` to preserve multi-line comments that contain `@cc_on`,
|
||||||
(e.g. `/^!/`) or a function.
|
`@license`, or `@preserve` (case-insensitive), a regular expression string
|
||||||
|
(e.g. `/^!/`), or a function which returns `boolean`, e.g.
|
||||||
|
```js
|
||||||
|
function(node, comment) {
|
||||||
|
return comment.value.indexOf("@type " + node.TYPE) >= 0;
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
- `indent_level` (default `4`)
|
- `indent_level` (default `4`)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user