-
Notifications
You must be signed in to change notification settings - Fork 200
Closed
Description
There is an error when using Record along with different types. Or maybe this is not something that is supported by choice?
Example
/**
* @param {{bar: (string|string[])}} options - this is object param.
*/
export function foo(options = {}) {}The following errors is thrown when bulding the docs.
esdoc/out/src/Publisher/Builder/DocBuilder.js:469
throw _iteratorError2;
^
SyntaxError: Invalid regular expression: /[~]\{bar: (string$/: Unterminated group
at RegExp (native)
Looked a bit more into this and the issue above is because of the parenthesis, however removing them results in a lint error about invalid JSDoc (might not be relevant for ESDoc).
/**
* @param {{bar: string|string[]}} options - this is object param.
*/
export function foo(options = {}) {}The output becomes.
| Name | Type | Attribute | Description |
|---|---|---|---|
| options | {bar: string | string[]} |
And not the expected.
| Name | Type | Attribute | Description |
|---|---|---|---|
| options | {bar: string | string[]} |