@wordpress/docgen 1.65.0 → 1.66.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.
@@ -237,16 +237,20 @@ function getMappedTypeAnnotation( typeAnnotation ) {
237
237
  * @param {babelTypes.TSTypeReference} typeAnnotation
238
238
  */
239
239
  function getTypeReferenceTypeAnnotation( typeAnnotation ) {
240
- if ( ! typeAnnotation.typeParameters ) {
241
- if ( babelTypes.isTSQualifiedName( typeAnnotation.typeName ) ) {
242
- return unifyQualifiedName( typeAnnotation.typeName );
243
- }
244
- return typeAnnotation.typeName.name;
240
+ let typeName;
241
+ if ( babelTypes.isTSQualifiedName( typeAnnotation.typeName ) ) {
242
+ typeName = unifyQualifiedName( typeAnnotation.typeName );
243
+ } else {
244
+ typeName = typeAnnotation.typeName.name;
245
245
  }
246
- const typeParams = typeAnnotation.typeParameters.params
247
- .map( getTypeAnnotation )
248
- .join( ', ' );
249
- return `${ typeAnnotation.typeName.name }< ${ typeParams } >`;
246
+
247
+ if ( typeAnnotation.typeParameters ) {
248
+ const typeParams = typeAnnotation.typeParameters.params
249
+ .map( getTypeAnnotation )
250
+ .join( ', ' );
251
+ typeName = `${ typeName }< ${ typeParams } >`;
252
+ }
253
+ return typeName;
250
254
  }
251
255
 
252
256
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/docgen",
3
- "version": "1.65.0",
3
+ "version": "1.66.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": "280403b4c1cf6cc2c55a6c4d56f9ef91145e4191"
41
+ "gitHead": "581d8a5580dba8f600b7268d51eb554771ae482c"
42
42
  }