From 33c2bc69bd7da205fee0157b1087b4873b9a3ba8 Mon Sep 17 00:00:00 2001 From: Gerrit Birkeland Date: Sat, 26 Dec 2020 16:48:24 -0700 Subject: [PATCH] fix: Somehow didn't save a file --- src/lib/converter/factories/signature.ts | 7 ++++++- src/test/converter/function/specs.json | 4 ++-- 2 files changed, 8 insertions(+), 3 deletions(-) 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": [ {