@wordpress/docgen 1.26.0 → 1.26.2

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.26.0",
3
+ "version": "1.26.2",
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": "0d732d4b184adcb28cc83087603e81b764390d4b"
41
+ "gitHead": "491b4b522dffb4d25aca066ec55500f456ac4aa3"
42
42
  }