chore: Fix documentation generation warnings. (#9325)

* chore: Replace @yields with @returns.

* fix: Update the ESLint config to not require @yields.

* chore: Move docs onto getters.
This commit is contained in:
Aaron Dodson
2025-08-19 14:56:59 -07:00
committed by GitHub
parent 405f7da280
commit ac7619a622
4 changed files with 5 additions and 9 deletions

View File

@@ -1126,7 +1126,7 @@ export class Block {
/**
* Returns a generator that provides every field on the block.
*
* @yields A generator that can be used to iterate the fields on the block.
* @returns A generator that can be used to iterate the fields on the block.
*/
*getFields(): Generator<Field, undefined, void> {
for (const input of this.inputList) {

View File

@@ -119,9 +119,6 @@ export abstract class Field<T = any>
return this.size;
}
/**
* Sets the size of this field.
*/
protected set size_(newValue: Size) {
this.size = newValue;
}

View File

@@ -102,11 +102,9 @@ export abstract class FieldInput<T extends InputTypes> extends Field<
*/
override SERIALIZABLE = true;
/**
* Sets the size of this field. Although this appears to be a no-op, it must
* exist since the getter is overridden below.
*/
protected override set size_(newValue: Size) {
// Although this appears to be a no-op, it must exist since the getter is
// overridden below.
super.size_ = newValue;
}

View File

@@ -89,7 +89,8 @@ function buildTSOverride({files, tsconfig}) {
'@typescript-eslint/no-explicit-any': ['off'],
// We use this pattern extensively for block (e.g. controls_if) interfaces.
'@typescript-eslint/no-empty-object-type': ['off'],
// TSDoc doesn't support @yields, so don't require that we use it.
'jsdoc/require-yields': ['off'],
// params and returns docs are optional.
'jsdoc/require-param-description': ['off'],
'jsdoc/require-returns': ['off'],