mirror of
https://github.com/google/blockly.git
synced 2026-01-07 00:50:27 +01:00
feat: add IIcon interface, and related interfaces (#7054)
* feat: add IIcon interface * feat: add ISerializable interface * feat: add IHasBubble interface * feat: add type guards for icon interfaces * chore: PR comments
This commit is contained in:
@@ -42,6 +42,7 @@ import * as userAgent from './utils/useragent.js';
|
||||
import * as utilsXml from './utils/xml.js';
|
||||
import * as WidgetDiv from './widgetdiv.js';
|
||||
import type {WorkspaceSvg} from './workspace_svg.js';
|
||||
import {ISerializable} from './interfaces/i_serializable.js';
|
||||
|
||||
/**
|
||||
* A function that is called to validate changes to the field's value before
|
||||
@@ -68,7 +69,7 @@ export type FieldValidator<T = any> = (newValue: T) => T|null|undefined;
|
||||
export abstract class Field<T = any> implements IASTNodeLocationSvg,
|
||||
IASTNodeLocationWithBlock,
|
||||
IKeyboardAccessible,
|
||||
IRegistrable {
|
||||
IRegistrable, ISerializable {
|
||||
/**
|
||||
* To overwrite the default value which is set in **Field**, directly update
|
||||
* the prototype.
|
||||
|
||||
Reference in New Issue
Block a user