|
1 | 1 | /** |
2 | | - * This is a function with a destructured parameter. |
3 | | - * |
4 | | - * @param destructuredParam - This is the parameter that is destructured. |
5 | | - * @param destructuredParam.paramZ - This is a string parameter. |
6 | | - * @param destructuredParam.paramG - This is a parameter flagged with any. |
7 | | - * This sentence is placed in the next line. |
8 | | - * |
9 | | - * @param destructuredParam.paramA |
10 | | - * This is a **parameter** pointing to an interface. |
11 | | - * |
12 | | - * ``` |
13 | | - * const value:BaseClass = new BaseClass('test'); |
14 | | - * functionWithArguments('arg', 0, value); |
15 | | - * ``` |
16 | | - * |
17 | | - * @returns This is the return value of the function. |
| 2 | + * @param params - desc |
| 3 | + * @param params.a - paramZ desc |
18 | 4 | */ |
19 | | -export function functionWithADestructuredParameter({ |
20 | | - paramZ, |
21 | | - paramG, |
22 | | - paramA, |
23 | | -}: { |
24 | | - paramZ: string; |
25 | | - paramG: any; |
26 | | - paramA: Object; |
27 | | -}): number { |
| 5 | +export function singleParam({ a }: { a: string }) { |
28 | 6 | return 0; |
29 | 7 | } |
30 | 8 |
|
31 | 9 | /** |
32 | | - * This is a function with a destructured parameter and additional undocumented parameters. |
33 | | - * The `@param` directives are ignored because we cannot be certain which parameter they refer to. |
34 | | - * |
35 | | - * @param destructuredParam - This is the parameter that is destructured. |
36 | | - * @param destructuredParam.paramZ - This is a string parameter. |
37 | | - * @param destructuredParam.paramG - This is a parameter flagged with any. |
38 | | - * This sentence is placed in the next line. |
39 | | - * |
40 | | - * @param destructuredParam.paramA |
41 | | - * This is a **parameter** pointing to an interface. |
42 | | - * |
43 | | - * ``` |
44 | | - * const value:BaseClass = new BaseClass('test'); |
45 | | - * functionWithArguments('arg', 0, value); |
46 | | - * ``` |
47 | | - * |
48 | | - * @returns This is the return value of the function. |
| 10 | + * @param params - desc |
49 | 11 | */ |
50 | | -export function functionWithADestructuredParameterAndExtraParameters( |
51 | | - { |
52 | | - paramZ, |
53 | | - paramG, |
54 | | - paramA, |
55 | | - }: { |
56 | | - paramZ: string; |
57 | | - paramG: any; |
58 | | - paramA: Object; |
59 | | - }, |
60 | | - extraParameter: string, |
61 | | -): number { |
| 12 | +export function extraParam({ a }: { a: string }, extraParameter: string) { |
62 | 13 | return 0; |
63 | 14 | } |
64 | 15 |
|
65 | 16 | /** |
66 | | - * This is a function with a destructured parameter and an extra `@param` directive with no corresponding parameter. |
67 | | - * The `@param` directives are ignored because we cannot be certain which corresponds to the real parameter. |
68 | | - * |
69 | | - * @param fakeParameter - This directive does not have a corresponding parameter. |
70 | | - * @param destructuredParam - This is the parameter that is destructured. |
71 | | - * @param destructuredParam.paramZ - This is a string parameter. |
72 | | - * @param destructuredParam.paramG - This is a parameter flagged with any. |
73 | | - * This sentence is placed in the next line. |
74 | | - * |
75 | | - * @param destructuredParam.paramA |
76 | | - * This is a **parameter** pointing to an interface. |
77 | | - * |
78 | | - * ``` |
79 | | - * const value:BaseClass = new BaseClass('test'); |
80 | | - * functionWithArguments('arg', 0, value); |
81 | | - * ``` |
82 | | - * |
83 | | - * @returns This is the return value of the function. |
| 17 | + * @param params param |
| 18 | + * @param fakeParameter param2 |
84 | 19 | */ |
85 | | -export function functionWithADestructuredParameterAndAnExtraParamDirective({ |
86 | | - paramZ, |
87 | | - paramG, |
88 | | - paramA, |
89 | | -}: { |
90 | | - paramZ: string; |
91 | | - paramG: any; |
92 | | - paramA: Object; |
93 | | -}): number { |
| 20 | +export function extraParamComment({ a }: { a: string }) { |
| 21 | + return 0; |
| 22 | +} |
| 23 | + |
| 24 | +/** |
| 25 | + * @param params params |
| 26 | + * @param params2 params2 |
| 27 | + */ |
| 28 | +export function multiParam( |
| 29 | + { a }: { a: string }, |
| 30 | + { b }: { b: number }, |
| 31 | + { c }: { c: boolean }, |
| 32 | +) { |
94 | 33 | return 0; |
95 | 34 | } |
0 commit comments