mirror of
https://github.com/google/blockly.git
synced 2026-01-05 08:00:09 +01:00
fix: set default field to any and fix validator function return type (#6690)
* chore: set default field to and fix validator function return type * Fix format
This commit is contained in:
committed by
GitHub
parent
d6230b2a44
commit
9ee1559e34
@@ -45,17 +45,17 @@ import * as WidgetDiv from './widgetdiv.js';
|
||||
import type {WorkspaceSvg} from './workspace_svg.js';
|
||||
import * as Xml from './xml.js';
|
||||
|
||||
export type FieldValidator<T = unknown> = (value: T) => void;
|
||||
export type FieldValidator<T = any> = (value?: T) => T|null|undefined;
|
||||
|
||||
/**
|
||||
* Abstract class for an editable field.
|
||||
*
|
||||
* @alias Blockly.Field
|
||||
*/
|
||||
export abstract class Field<T = unknown> implements IASTNodeLocationSvg,
|
||||
IASTNodeLocationWithBlock,
|
||||
IKeyboardAccessible,
|
||||
IRegistrable {
|
||||
export abstract class Field<T = any> implements IASTNodeLocationSvg,
|
||||
IASTNodeLocationWithBlock,
|
||||
IKeyboardAccessible,
|
||||
IRegistrable {
|
||||
/**
|
||||
* To overwrite the default value which is set in **Field**, directly update
|
||||
* the prototype.
|
||||
|
||||
Reference in New Issue
Block a user