Skip to content

Commit 05643f6

Browse files
Only show arguments if notes are added including bounds
1 parent b21792f commit 05643f6

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

tools/api-docs-generator-test-snapshots/test/bounds/__snapshots__/bounds.spec.ts.snap

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,6 @@ export class ClassWithBounds {
476476
* Minimum value: -255
477477
* @param t
478478
* Maximum value: 1
479-
* @param u
480479
* @param v
481480
* Minimum value: -255
482481
* Maximum value: -1
@@ -487,7 +486,6 @@ export class ClassWithBounds {
487486
* Minimum value: 1
488487
* @param y
489488
* Maximum value: 255
490-
* @param z
491489
*/
492490
methodThatTakesBoundedValue(
493491
s: number,
@@ -598,11 +596,9 @@ export class ClassWithBounds {
598596
* Minimum value: 1
599597
* @param t
600598
* Maximum value: 255
601-
* @param u
602599
* @param v
603600
* Minimum value: 1
604601
* Maximum value: 255
605-
* @param w
606602
* @param x
607603
* Maximum value: 255
608604
* @param y

tools/api-docs-generator/src/filters/CommonFilters.ts

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1727,13 +1727,19 @@ function boundValues(releases: MinecraftRelease[]) {
17271727
continue;
17281728
}
17291729

1730-
if (argumentJson.details.min_value !== undefined) {
1731-
functionJson.has_bounds = true;
1730+
if (
1731+
argumentJson.details.has_min !== undefined &&
1732+
argumentJson.details.has_min === true &&
1733+
argumentJson.details.min_value !== undefined
1734+
) {
17321735
argumentJson.has_bounds = true;
17331736
}
17341737

1735-
if (argumentJson.details.max_value !== undefined) {
1736-
functionJson.has_bounds = true;
1738+
if (
1739+
argumentJson.details.has_max !== undefined &&
1740+
argumentJson.details.has_max === true &&
1741+
argumentJson.details.max_value !== undefined
1742+
) {
17371743
argumentJson.has_bounds = true;
17381744
}
17391745
}

0 commit comments

Comments
 (0)