@wordpress/docgen 1.26.1 → 1.27.1-next.4d3b314fd5.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/lib/get-type-annotation.js +8 -2
- package/package.json +2 -2
- package/CHANGELOG.md +0 -48
|
@@ -405,18 +405,24 @@ function unwrapWrappedSelectors( token ) {
|
|
|
405
405
|
return token;
|
|
406
406
|
}
|
|
407
407
|
|
|
408
|
+
if ( babelTypes.isTSAsExpression( token ) ) {
|
|
409
|
+
// ( ( state, queryId ) => state.queries[ queryId ] ) as any;
|
|
410
|
+
// \------------------------------------------------/ CallExpression.expression
|
|
411
|
+
return unwrapWrappedSelectors( token.expression );
|
|
412
|
+
}
|
|
413
|
+
|
|
408
414
|
if ( babelTypes.isCallExpression( token ) ) {
|
|
409
415
|
// createSelector( ( state, queryId ) => state.queries[ queryId ] );
|
|
410
416
|
// \--------------------------------------------/ CallExpression.arguments[0]
|
|
411
417
|
if ( token.callee.name === 'createSelector' ) {
|
|
412
|
-
return token.arguments[ 0 ];
|
|
418
|
+
return unwrapWrappedSelectors( token.arguments[ 0 ] );
|
|
413
419
|
}
|
|
414
420
|
|
|
415
421
|
// createRegistrySelector( ( selector ) => ( state, queryId ) => select( 'core/queries' ).get( queryId ) );
|
|
416
422
|
// \-----------------------------------------------------------/ CallExpression.arguments[0].body
|
|
417
423
|
// \---------------------------------------------------------------------------/ CallExpression.arguments[0]
|
|
418
424
|
if ( token.callee.name === 'createRegistrySelector' ) {
|
|
419
|
-
return token.arguments[ 0 ].body;
|
|
425
|
+
return unwrapWrappedSelectors( token.arguments[ 0 ].body );
|
|
420
426
|
}
|
|
421
427
|
}
|
|
422
428
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/docgen",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.27.1-next.4d3b314fd5.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",
|
|
@@ -38,5 +38,5 @@
|
|
|
38
38
|
"publishConfig": {
|
|
39
39
|
"access": "public"
|
|
40
40
|
},
|
|
41
|
-
"gitHead": "
|
|
41
|
+
"gitHead": "25054766423cb49d959eb656c2533530073ff5c2"
|
|
42
42
|
}
|
package/CHANGELOG.md
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
<!-- Learn how to maintain this file at https://github.com/WordPress/gutenberg/tree/HEAD/packages#maintaining-changelogs. -->
|
|
2
|
-
|
|
3
|
-
## Unreleased
|
|
4
|
-
|
|
5
|
-
## 1.18.0 (2021-07-21)
|
|
6
|
-
|
|
7
|
-
### Bug Fixes
|
|
8
|
-
|
|
9
|
-
- Fix getting param annotations for default exported functions. ([#31603](https://github.com/WordPress/gutenberg/pull/31603))
|
|
10
|
-
|
|
11
|
-
## 1.17.0 (2021-04-29)
|
|
12
|
-
|
|
13
|
-
### New Features
|
|
14
|
-
|
|
15
|
-
- Add support for array and object destructured arguments in TypeScript documentation generation.
|
|
16
|
-
- Add support for default arguments in TypeScript.
|
|
17
|
-
- Add support for static non-function variable type extraction in TypeScript.
|
|
18
|
-
|
|
19
|
-
## 1.16.0 (2021-03-17)
|
|
20
|
-
|
|
21
|
-
- Replace deprecated `doctrine` parser with simpler `comment-parser` to support a wider variety of types. This also de-normalizes types such that types will be transcribed exactly as they are declared in the doc comments.
|
|
22
|
-
- Add support for TypeScript type annotations by using the TypeScript plugin for babel. This allows docgen to extract explicitly annotated types from exported functions and variables. It is _not_ able to consume inferred types.
|
|
23
|
-
|
|
24
|
-
## 1.7.0 (2020-02-04)
|
|
25
|
-
|
|
26
|
-
### Bug Fixes
|
|
27
|
-
|
|
28
|
-
- The built-in Markdown formatter will output text indicating that the type is unknown if a type cannot be parsed. Previously, these would be output wrongly as the `null` type.
|
|
29
|
-
|
|
30
|
-
## 1.3.0 (2019-08-05)
|
|
31
|
-
|
|
32
|
-
### Bug Fixes
|
|
33
|
-
|
|
34
|
-
- Docblocks with CRLF endings are now parsed correctly.
|
|
35
|
-
|
|
36
|
-
## 1.2.0 (2019-05-21)
|
|
37
|
-
|
|
38
|
-
### Enhancement
|
|
39
|
-
|
|
40
|
-
- Docblocks including a `@private` tag will be omitted from the generated result.
|
|
41
|
-
|
|
42
|
-
### Internal
|
|
43
|
-
|
|
44
|
-
- Remove unneccessary argument from an instance of `Array#pop`.
|
|
45
|
-
|
|
46
|
-
## 1.0.0 (2019-03-06)
|
|
47
|
-
|
|
48
|
-
- Initial release
|