@wordpress/docgen 2.14.0 → 2.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +1 -1
- package/README.md +7 -7
- package/lib/get-type-annotation.js +1 -1
- package/lib/index.js +1 -1
- package/package.json +2 -2
package/LICENSE.md
CHANGED
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@ Some characteristics:
|
|
|
6
6
|
|
|
7
7
|
- If the export statement doesn't contain any JSDoc, it'll look up for JSDoc up to the declaration.
|
|
8
8
|
- It can resolve relative dependencies, either files or directories. For example, `import default from './dependency'` will find `dependency.js` or `dependency/index.js`
|
|
9
|
-
- For TypeScript support, all types must be
|
|
9
|
+
- For TypeScript support, all types must be explicitly annotated as the TypeScript Babel plugin is unable to consume inferred types (it does not run the TS compiler, after all—it merely parses TypeScript). For example, all function return types must be explicitly annotated if they are to be documented by `docgen`.
|
|
10
10
|
|
|
11
11
|
## Installation
|
|
12
12
|
|
|
@@ -169,12 +169,12 @@ with `./count/index.js` contents being:
|
|
|
169
169
|
|
|
170
170
|
````js
|
|
171
171
|
/**
|
|
172
|
-
*
|
|
172
|
+
* Subtracts two numbers.
|
|
173
173
|
*
|
|
174
174
|
* @example
|
|
175
175
|
*
|
|
176
176
|
* ```js
|
|
177
|
-
* const result =
|
|
177
|
+
* const result = subtraction( 5, 2 );
|
|
178
178
|
* console.log( result ); // Will log 3
|
|
179
179
|
* ```
|
|
180
180
|
*
|
|
@@ -182,7 +182,7 @@ with `./count/index.js` contents being:
|
|
|
182
182
|
* @param {number} term2 Second number.
|
|
183
183
|
* @return {number} The result of subtracting the two numbers.
|
|
184
184
|
*/
|
|
185
|
-
export function
|
|
185
|
+
export function subtraction( term1, term2 ) {
|
|
186
186
|
return term1 - term2;
|
|
187
187
|
}
|
|
188
188
|
|
|
@@ -233,16 +233,16 @@ console.log( result ); // Will log 7
|
|
|
233
233
|
|
|
234
234
|
`number` The result of adding the two numbers.
|
|
235
235
|
|
|
236
|
-
##
|
|
236
|
+
## subtraction
|
|
237
237
|
|
|
238
238
|
[example-module.js#L1-L1](example-module.js#L1-L1)
|
|
239
239
|
|
|
240
|
-
|
|
240
|
+
Subtracts two numbers.
|
|
241
241
|
|
|
242
242
|
**Usage**
|
|
243
243
|
|
|
244
244
|
```js
|
|
245
|
-
const result =
|
|
245
|
+
const result = subtraction( 5, 2 );
|
|
246
246
|
console.log( result ); // Will log 3
|
|
247
247
|
```
|
|
248
248
|
|
|
@@ -394,7 +394,7 @@ function getTypeAnnotation( typeAnnotation ) {
|
|
|
394
394
|
* with their descriptions in the JSDoc comments.
|
|
395
395
|
*
|
|
396
396
|
* If we find more wrapper functions on selectors we should add them below following the
|
|
397
|
-
* example of `createSelector` and `
|
|
397
|
+
* example of `createSelector` and `createRegistrySelector`.
|
|
398
398
|
*
|
|
399
399
|
* @param {ASTNode} token Contains either a function or a call to a function-wrapper.
|
|
400
400
|
*
|
package/lib/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/docgen",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.16.0",
|
|
4
4
|
"description": "Autogenerate public API documentation from exports and JSDoc comments.",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -42,5 +42,5 @@
|
|
|
42
42
|
"publishConfig": {
|
|
43
43
|
"access": "public"
|
|
44
44
|
},
|
|
45
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "f48b9f56629e400891abb5ae491504de475237ff"
|
|
46
46
|
}
|