mirror of
https://github.com/google/blockly.git
synced 2025-12-15 22:00:07 +01:00
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:
@@ -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) {
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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'],
|
||||
|
||||
Reference in New Issue
Block a user