@wordpress/docgen 1.27.0 → 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.
@@ -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.27.0",
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": "23e136283fa1d3b8d9d8b33869f871ad5eb77726"
41
+ "gitHead": "25054766423cb49d959eb656c2533530073ff5c2"
42
42
  }
package/CHANGELOG.md DELETED
@@ -1,50 +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.27.0 (2022-09-21)
6
-
7
- ## 1.18.0 (2021-07-21)
8
-
9
- ### Bug Fixes
10
-
11
- - Fix getting param annotations for default exported functions. ([#31603](https://github.com/WordPress/gutenberg/pull/31603))
12
-
13
- ## 1.17.0 (2021-04-29)
14
-
15
- ### New Features
16
-
17
- - Add support for array and object destructured arguments in TypeScript documentation generation.
18
- - Add support for default arguments in TypeScript.
19
- - Add support for static non-function variable type extraction in TypeScript.
20
-
21
- ## 1.16.0 (2021-03-17)
22
-
23
- - 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.
24
- - 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.
25
-
26
- ## 1.7.0 (2020-02-04)
27
-
28
- ### Bug Fixes
29
-
30
- - 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.
31
-
32
- ## 1.3.0 (2019-08-05)
33
-
34
- ### Bug Fixes
35
-
36
- - Docblocks with CRLF endings are now parsed correctly.
37
-
38
- ## 1.2.0 (2019-05-21)
39
-
40
- ### Enhancement
41
-
42
- - Docblocks including a `@private` tag will be omitted from the generated result.
43
-
44
- ### Internal
45
-
46
- - Remove unneccessary argument from an instance of `Array#pop`.
47
-
48
- ## 1.0.0 (2019-03-06)
49
-
50
- - Initial release