From b99bbb5ee6d4b8c311afb00eaaa67c193ca0c4ef Mon Sep 17 00:00:00 2001 From: ST-DDT Date: Wed, 20 Apr 2022 08:22:09 +0200 Subject: docs: fix lost description texts (#836) --- test/scripts/apidoc/signature.example.ts | 19 ++++++++++++------- test/scripts/apidoc/signature.expected.json | 8 ++++---- 2 files changed, 16 insertions(+), 11 deletions(-) (limited to 'test/scripts') diff --git a/test/scripts/apidoc/signature.example.ts b/test/scripts/apidoc/signature.example.ts index de1cd79a..9c9b483e 100644 --- a/test/scripts/apidoc/signature.example.ts +++ b/test/scripts/apidoc/signature.example.ts @@ -155,11 +155,16 @@ export class SignatureTest { * Test with a function parameters (inline types) with defaults. * * @param a Parameter with signature default. + * It also has a more complex description. * @param a.value The number parameter. - * @param b Parameter with jsdocs default. Defaults to `{ value: 1 }`. - * @param b.value The boolean parameter. + * @param b Parameter with jsdocs default. + * + * It also has a more complex description. + * + * Defaults to `{ value: 1 }`. + * @param b.value The number parameter. * @param c Parameter with inner jsdocs default. - * @param c.value The boolean parameter. Defaults to `2`. + * @param c.value The number parameter. It also has a more complex description. Defaults to `2`. */ optionsInlineParamMethodWithDefaults( a: { value?: number } = { value: 1 }, @@ -175,9 +180,9 @@ export class SignatureTest { * @param a Parameter with signature default. * @param a.value The number parameter. * @param b Parameter with jsdocs default. Defaults to `{ value: 1 }`. - * @param b.value The boolean parameter. + * @param b.value The number parameter. * @param c Parameter with inner jsdocs default. - * @param c.value The boolean parameter. Defaults to `2`. + * @param c.value The number parameter. Defaults to `2`. */ optionsTypeParamMethodWithDefaults( a: ParameterOptionsTypeA = { value: 1 }, @@ -193,9 +198,9 @@ export class SignatureTest { * @param a Parameter with signature default. * @param a.value The number parameter. * @param b Parameter with jsdocs default. Defaults to `{ value: 1 }`. - * @param b.value The boolean parameter. + * @param b.value The number parameter. * @param c Parameter with inner jsdocs default. - * @param c.value The boolean parameter. Defaults to `2`. + * @param c.value The number parameter. Defaults to `2`. */ optionsInterfaceParamMethodWithDefaults( a: ParameterOptionsInterfaceA = { value: 1 }, diff --git a/test/scripts/apidoc/signature.expected.json b/test/scripts/apidoc/signature.expected.json index 32920f78..f576a342 100644 --- a/test/scripts/apidoc/signature.expected.json +++ b/test/scripts/apidoc/signature.expected.json @@ -130,7 +130,7 @@ "name": "a", "type": "{ ... }", "default": "{ value: 1 }", - "description": "

Parameter with signature default.

\n" + "description": "

Parameter with signature default.\nIt also has a more complex description.

\n" }, { "name": "a.value?", @@ -141,12 +141,12 @@ "name": "b", "type": "{ ... }", "default": "{ value: 1 }", - "description": "

Parameter with jsdocs default.

\n" + "description": "

Parameter with jsdocs default.

\n

It also has a more complex description.

\n" }, { "name": "b.value?", "type": "number", - "description": "

The boolean parameter.

\n" + "description": "

The number parameter.

\n" }, { "name": "c", @@ -157,7 +157,7 @@ "name": "c.value?", "type": "number", "default": "2", - "description": "

The boolean parameter.

\n" + "description": "

The number parameter. It also has a more complex description.

\n" } ], "returns": "number", -- cgit v1.2.3