diff --git a/src/lib/converter/factories/signature.ts b/src/lib/converter/factories/signature.ts index 895301fe3..1bff3b81d 100644 --- a/src/lib/converter/factories/signature.ts +++ b/src/lib/converter/factories/signature.ts @@ -33,7 +33,12 @@ export function createSignature( | ts.SignatureDeclaration | undefined; - if (!commentDeclaration && declaration && (ts.isArrowFunction(declaration) || ts.isFunctionExpression(declaration)) { + if ( + !commentDeclaration && + declaration && + (ts.isArrowFunction(declaration) || + ts.isFunctionExpression(declaration)) + ) { commentDeclaration = declaration.parent; } commentDeclaration ??= declaration; diff --git a/src/test/converter/function/specs.json b/src/test/converter/function/specs.json index 77a49dbdf..872be5465 100644 --- a/src/test/converter/function/specs.json +++ b/src/test/converter/function/specs.json @@ -294,7 +294,7 @@ "flags": {}, "comment": { "shortText": "Returns true if fn returns true for every item in the iterator", - "text": "Returns true if the iterator is empty\n\n## Example\n```typescript\nall(e => e > 1, [1, 2, 3]) // false\nall(e => e > 0, [1, 2, 3]) // true\nall(e => e > 1, []) // true\n```\n" + "text": "Returns true if the iterator is empty\n" }, "typeParameter": [ { @@ -380,7 +380,7 @@ "flags": {}, "comment": { "shortText": "Returns true if fn returns true for every item in the iterator", - "text": "Returns true if the iterator is empty\n\n## Example\n```typescript\nall(e => e > 1, [1, 2, 3]) // false\nall(e => e > 0, [1, 2, 3]) // true\nall(e => e > 1, []) // true\n```\n" + "text": "Returns true if the iterator is empty\n" }, "typeParameter": [ {