bio-dts 0.15.2 → 0.15.3

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.
@@ -409,7 +409,7 @@ export default function transform(src, transformOptions = {}) {
409
409
  const returnTags = tags.filter(t => t.name === 'return' || t.name === 'returns');
410
410
 
411
411
  if (returnTags.length > 1) {
412
- throw error(hostPath.value, 'must specify zero or one @return(s) type in @overload fn');
412
+ throw error(hostPath.value, `must specify zero or one @return(s) in JSDoc - found ${returnTags.length}`);
413
413
  }
414
414
 
415
415
  return [
@@ -502,6 +502,14 @@ declare function p${
502
502
  return replacements;
503
503
  }
504
504
 
505
+ /**
506
+ * Clean the given (JSDoc) comment node - strip what is not necessary in
507
+ * type declarations: remove JSDoc only annotations, fixup type parameters.
508
+ *
509
+ * @param {any} comment - the comment node
510
+ *
511
+ * @return {any|null} - the cleaned comment node or null if it shall be dropped
512
+ */
505
513
  function cleanComment(comment) {
506
514
 
507
515
  /**
@@ -566,11 +574,13 @@ declare function p${
566
574
  }
567
575
 
568
576
  /**
577
+ * Cleans comments on the given node - strip what is not necessary
578
+ * in type declarations.
579
+ *
569
580
  * @param { Path<any> } nodePath
570
581
  */
571
582
  function cleanComments(nodePath) {
572
583
 
573
- // clean JSDoc comments: remove annotation, fixup type parameters
574
584
  const comments = nodePath.get('comments') || { value: [] };
575
585
 
576
586
  for (const key of keys(comments.value || []).reverse()) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bio-dts",
3
- "version": "0.15.2",
3
+ "version": "0.15.3",
4
4
  "description": "Generate sane and clean types from JavaScript sources",
5
5
  "type": "module",
6
6
  "bin": "./bin/cmd.js",