mirror of
https://github.com/google/blockly.git
synced 2026-01-09 10:00:09 +01:00
Add namespace and alias annotations to jsdoc (#5550)
* Add annotations to files under core/events * Add annotations to files under core/interfaces * Add annotations to files under core/keyboard_nav * Add annotations to files under core/renderers * Add annotations to files under core/serialization * Add annotations to files under core/theme * Add annotations to files under core/toolbox * Add annotations to files under core/utils * Add annotations to files under core
This commit is contained in:
@@ -11,11 +11,16 @@
|
||||
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* The interface for an AST node location.
|
||||
* @namespace Blockly.IASTNodeLocation
|
||||
*/
|
||||
goog.module('Blockly.IASTNodeLocation');
|
||||
|
||||
/**
|
||||
* An AST node location interface.
|
||||
* @interface
|
||||
* @alias Blockly.IASTNodeLocation
|
||||
*/
|
||||
const IASTNodeLocation = function() {};
|
||||
|
||||
|
||||
@@ -11,6 +11,10 @@
|
||||
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* The interface for an AST node location SVG.
|
||||
* @namespace Blockly.IASTNodeLocationSvg
|
||||
*/
|
||||
goog.module('Blockly.IASTNodeLocationSvg');
|
||||
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
@@ -21,6 +25,7 @@ const IASTNodeLocation = goog.requireType('Blockly.IASTNodeLocation');
|
||||
* An AST node location SVG interface.
|
||||
* @interface
|
||||
* @extends {IASTNodeLocation}
|
||||
* @alias Blockly.IASTNodeLocationSvg
|
||||
*/
|
||||
const IASTNodeLocationSvg = function() {};
|
||||
|
||||
|
||||
@@ -12,6 +12,11 @@
|
||||
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* The interface for an AST node location that has an associated
|
||||
* block.
|
||||
* @namespace Blockly.IASTNodeLocationWithBlock
|
||||
*/
|
||||
goog.module('Blockly.IASTNodeLocationWithBlock');
|
||||
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
@@ -24,6 +29,7 @@ const {Block} = goog.requireType('Blockly.Block');
|
||||
* An AST node location that has an associated block.
|
||||
* @interface
|
||||
* @extends {IASTNodeLocation}
|
||||
* @alias Blockly.IASTNodeLocationWithBlock
|
||||
*/
|
||||
const IASTNodeLocationWithBlock = function() {};
|
||||
|
||||
|
||||
@@ -12,6 +12,11 @@
|
||||
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* The interface for a component that is automatically hidden
|
||||
* when WorkspaceSvg.hideChaff is called.
|
||||
* @namespace Blockly.IAutoHideable
|
||||
*/
|
||||
goog.module('Blockly.IAutoHideable');
|
||||
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
@@ -22,6 +27,7 @@ const IComponent = goog.requireType('Blockly.IComponent');
|
||||
* Interface for a component that can be automatically hidden.
|
||||
* @extends {IComponent}
|
||||
* @interface
|
||||
* @alias Blockly.IAutoHideable
|
||||
*/
|
||||
const IAutoHideable = function() {};
|
||||
|
||||
|
||||
@@ -11,6 +11,10 @@
|
||||
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* The interface for a block dragger.
|
||||
* @namespace Blockly.IBlockDragger
|
||||
*/
|
||||
goog.module('Blockly.IBlockDragger');
|
||||
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
@@ -22,6 +26,7 @@ const {BlockSvg} = goog.requireType('Blockly.BlockSvg');
|
||||
/**
|
||||
* A block dragger interface.
|
||||
* @interface
|
||||
* @alias Blockly.IBlockDragger
|
||||
*/
|
||||
const IBlockDragger = function() {};
|
||||
|
||||
|
||||
@@ -11,6 +11,10 @@
|
||||
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* The interface for a bounded element.
|
||||
* @namespace Blockly.IBoundedElement
|
||||
*/
|
||||
goog.module('Blockly.IBoundedElement');
|
||||
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
@@ -20,6 +24,7 @@ const Rect = goog.requireType('Blockly.utils.Rect');
|
||||
/**
|
||||
* A bounded element interface.
|
||||
* @interface
|
||||
* @alias Blockly.IBoundedElement
|
||||
*/
|
||||
const IBoundedElement = function() {};
|
||||
|
||||
|
||||
@@ -11,6 +11,10 @@
|
||||
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* The interface for a bubble.
|
||||
* @namespace Blockly.IBubble
|
||||
*/
|
||||
goog.module('Blockly.IBubble');
|
||||
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
@@ -28,6 +32,7 @@ const {BlockDragSurfaceSvg} = goog.requireType('Blockly.BlockDragSurfaceSvg');
|
||||
* @interface
|
||||
* @extends {IDraggable}
|
||||
* @extends {IContextMenu}
|
||||
* @alias Blockly.IBubble
|
||||
*/
|
||||
const IBubble = function() {};
|
||||
|
||||
|
||||
@@ -11,6 +11,10 @@
|
||||
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* The interface for a collapsible toolbox item.
|
||||
* @namespace Blockly.ICollapsibleToolboxItem
|
||||
*/
|
||||
goog.module('Blockly.ICollapsibleToolboxItem');
|
||||
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
@@ -23,6 +27,7 @@ const IToolboxItem = goog.requireType('Blockly.IToolboxItem');
|
||||
* Interface for an item in the toolbox that can be collapsed.
|
||||
* @extends {ISelectableToolboxItem}
|
||||
* @interface
|
||||
* @alias Blockly.ICollapsibleToolboxItem
|
||||
*/
|
||||
const ICollapsibleToolboxItem = function() {};
|
||||
|
||||
|
||||
@@ -12,6 +12,11 @@
|
||||
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* Interface for a workspace component that can be registered with
|
||||
* the ComponentManager.
|
||||
* @namespace Blockly.IComponent
|
||||
*/
|
||||
goog.module('Blockly.IComponent');
|
||||
|
||||
|
||||
@@ -19,6 +24,7 @@ goog.module('Blockly.IComponent');
|
||||
* The interface for a workspace component that can be registered with the
|
||||
* ComponentManager.
|
||||
* @interface
|
||||
* @alias Blockly.IComponent
|
||||
*/
|
||||
const IComponent = function() {};
|
||||
|
||||
|
||||
@@ -11,6 +11,11 @@
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* The interface for an object that encapsulates logic for
|
||||
* checking whether a potential connection is safe and valid.
|
||||
* @namespace Blockly.IConnectionChecker
|
||||
*/
|
||||
goog.module('Blockly.IConnectionChecker');
|
||||
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
@@ -22,6 +27,7 @@ const RenderedConnection = goog.requireType('Blockly.RenderedConnection');
|
||||
/**
|
||||
* Class for connection type checking logic.
|
||||
* @interface
|
||||
* @alias Blockly.IConnectionChecker
|
||||
*/
|
||||
const IConnectionChecker = function() {};
|
||||
|
||||
|
||||
@@ -11,11 +11,16 @@
|
||||
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* The interface for an object that supports a right-click.
|
||||
* @namespace Blockly.IContextMenu
|
||||
*/
|
||||
goog.module('Blockly.IContextMenu');
|
||||
|
||||
|
||||
/**
|
||||
* @interface
|
||||
* @alias Blockly.IContextMenu
|
||||
*/
|
||||
const IContextMenu = function() {};
|
||||
|
||||
|
||||
@@ -11,6 +11,10 @@
|
||||
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* The interface for an object that is copyable.
|
||||
* @namespace Blockly.ICopyable
|
||||
*/
|
||||
goog.module('Blockly.ICopyable');
|
||||
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
@@ -22,6 +26,7 @@ const WorkspaceSvg = goog.requireType('Blockly.WorkspaceSvg');
|
||||
/**
|
||||
* @extends {ISelectable}
|
||||
* @interface
|
||||
* @alias Blockly.ICopyable
|
||||
*/
|
||||
const ICopyable = function() {};
|
||||
|
||||
|
||||
@@ -11,12 +11,17 @@
|
||||
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* The interface for an object that is deletable.
|
||||
* @namespace Blockly.IDeletable
|
||||
*/
|
||||
goog.module('Blockly.IDeletable');
|
||||
|
||||
|
||||
/**
|
||||
* The interface for an object that can be deleted.
|
||||
* @interface
|
||||
* @alias Blockly.IDeletable
|
||||
*/
|
||||
const IDeletable = function() {};
|
||||
|
||||
|
||||
@@ -12,6 +12,11 @@
|
||||
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* The interface for a component that can delete a block or bubble
|
||||
* that is dropped on top of it.
|
||||
* @namespace Blockly.IDeleteArea
|
||||
*/
|
||||
goog.module('Blockly.IDeleteArea');
|
||||
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
@@ -25,6 +30,7 @@ const IDragTarget = goog.requireType('Blockly.IDragTarget');
|
||||
* on top of it.
|
||||
* @extends {IDragTarget}
|
||||
* @interface
|
||||
* @alias Blockly.IDeleteArea
|
||||
*/
|
||||
const IDeleteArea = function() {};
|
||||
|
||||
|
||||
@@ -12,6 +12,11 @@
|
||||
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* The interface for a component that has a handler for when a
|
||||
* block is dropped on top of it.
|
||||
* @namespace Blockly.IDragTarget
|
||||
*/
|
||||
goog.module('Blockly.IDragTarget');
|
||||
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
@@ -27,6 +32,7 @@ const Rect = goog.requireType('Blockly.utils.Rect');
|
||||
* dragged over or dropped on top of it.
|
||||
* @extends {IComponent}
|
||||
* @interface
|
||||
* @alias Blockly.IDragTarget
|
||||
*/
|
||||
const IDragTarget = function() {};
|
||||
|
||||
|
||||
@@ -11,6 +11,10 @@
|
||||
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* The interface for an object that is draggable.
|
||||
* @namespace Blockly.IDraggable
|
||||
*/
|
||||
goog.module('Blockly.IDraggable');
|
||||
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
@@ -21,6 +25,7 @@ const IDeletable = goog.requireType('Blockly.IDeletable');
|
||||
* The interface for an object that can be dragged.
|
||||
* @extends {IDeletable}
|
||||
* @interface
|
||||
* @alias Blockly.IDraggable
|
||||
*/
|
||||
const IDraggable = function() {};
|
||||
|
||||
|
||||
@@ -11,6 +11,10 @@
|
||||
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* The interface for a flyout.
|
||||
* @namespace Blockly.IFlyout
|
||||
*/
|
||||
goog.module('Blockly.IFlyout');
|
||||
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
@@ -31,6 +35,7 @@ const {BlockSvg} = goog.requireType('Blockly.BlockSvg');
|
||||
* Interface for a flyout.
|
||||
* @extends {IRegistrable}
|
||||
* @interface
|
||||
* @alias Blockly.IFlyout
|
||||
*/
|
||||
const IFlyout = function() {};
|
||||
|
||||
|
||||
@@ -11,6 +11,10 @@
|
||||
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* The interface for objects that handle keyboard shortcuts.
|
||||
* @namespace Blockly.IKeyboardAccessible
|
||||
*/
|
||||
goog.module('Blockly.IKeyboardAccessible');
|
||||
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
@@ -20,6 +24,7 @@ const ShortcutRegistry = goog.requireType('Blockly.ShortcutRegistry');
|
||||
/**
|
||||
* An interface for an object that handles keyboard shortcuts.
|
||||
* @interface
|
||||
* @alias Blockly.IKeyboardAccessible
|
||||
*/
|
||||
const IKeyboardAccessible = function() {};
|
||||
|
||||
|
||||
@@ -11,6 +11,10 @@
|
||||
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* The interface for a metrics manager.
|
||||
* @namespace Blockly.IMetricsManager
|
||||
*/
|
||||
goog.module('Blockly.IMetricsManager');
|
||||
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
@@ -24,6 +28,7 @@ const Size = goog.requireType('Blockly.utils.Size');
|
||||
/**
|
||||
* Interface for a metrics manager.
|
||||
* @interface
|
||||
* @alias Blockly.IMetricsManager
|
||||
*/
|
||||
const IMetricsManager = function() {};
|
||||
|
||||
|
||||
@@ -11,12 +11,17 @@
|
||||
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* The interface for an object that is movable.
|
||||
* @namespace Blockly.IMovable
|
||||
*/
|
||||
goog.module('Blockly.IMovable');
|
||||
|
||||
|
||||
/**
|
||||
* The interface for an object that is movable.
|
||||
* @interface
|
||||
* @alias Blockly.IMovable
|
||||
*/
|
||||
const IMovable = function() {};
|
||||
|
||||
|
||||
@@ -11,6 +11,10 @@
|
||||
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* The interface for a positionable UI element.
|
||||
* @namespace Blockly.IPositionable
|
||||
*/
|
||||
goog.module('Blockly.IPositionable');
|
||||
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
@@ -25,6 +29,7 @@ const Rect = goog.requireType('Blockly.utils.Rect');
|
||||
* Interface for a component that is positioned on top of the workspace.
|
||||
* @extends {IComponent}
|
||||
* @interface
|
||||
* @alias Blockly.IPositionable
|
||||
*/
|
||||
const IPositionable = function() {};
|
||||
|
||||
|
||||
@@ -12,12 +12,18 @@
|
||||
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* The interface for a Blockly component that can be registered.
|
||||
* (Ex. Toolbox, Fields, Renderers)
|
||||
* @namespace Blockly.IRegistrable
|
||||
*/
|
||||
goog.module('Blockly.IRegistrable');
|
||||
|
||||
|
||||
/**
|
||||
* The interface for a Blockly component that can be registered.
|
||||
* @interface
|
||||
* @alias Blockly.IRegistrable
|
||||
*/
|
||||
const IRegistrable = function() {};
|
||||
|
||||
|
||||
@@ -11,6 +11,10 @@
|
||||
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* The interface for a Blockly field that can be registered.
|
||||
* @namespace Blockly.IRegistrableField
|
||||
*/
|
||||
goog.module('Blockly.IRegistrableField');
|
||||
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
|
||||
@@ -11,6 +11,10 @@
|
||||
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* The interface for an object that is selectable.
|
||||
* @namespace Blockly.ISelectable
|
||||
*/
|
||||
goog.module('Blockly.ISelectable');
|
||||
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
@@ -24,6 +28,7 @@ const IMovable = goog.requireType('Blockly.IMovable');
|
||||
* @extends {IDeletable}
|
||||
* @extends {IMovable}
|
||||
* @interface
|
||||
* @alias Blockly.ISelectable
|
||||
*/
|
||||
const ISelectable = function() {};
|
||||
|
||||
|
||||
@@ -11,6 +11,10 @@
|
||||
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* The interface for a selectable toolbox item.
|
||||
* @namespace Blockly.ISelectableToolboxItem
|
||||
*/
|
||||
goog.module('Blockly.ISelectableToolboxItem');
|
||||
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
@@ -23,6 +27,7 @@ const toolbox = goog.requireType('Blockly.utils.toolbox');
|
||||
* Interface for an item in the toolbox that can be selected.
|
||||
* @extends {IToolboxItem}
|
||||
* @interface
|
||||
* @alias Blockly.ISelectableToolboxItem
|
||||
*/
|
||||
const ISelectableToolboxItem = function() {};
|
||||
|
||||
|
||||
@@ -6,11 +6,16 @@
|
||||
|
||||
/**
|
||||
* @fileoverview The record type for an object containing functions for
|
||||
* serializing part of the workspace.
|
||||
* serializing part of the workspace.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* The record type for an object containing functions for
|
||||
* serializing part of the workspace.
|
||||
* @namespace Blockly.serialization.ISerializer
|
||||
*/
|
||||
goog.module('Blockly.serialization.ISerializer');
|
||||
goog.module.declareLegacyNamespace();
|
||||
|
||||
@@ -21,6 +26,7 @@ const Workspace = goog.requireType('Blockly.Workspace');
|
||||
/**
|
||||
* Serializes and deserializes a plugin or system.
|
||||
* @interface
|
||||
* @alias Blockly.serialization.ISerializer.ISerializer
|
||||
*/
|
||||
class ISerializer {
|
||||
constructor() {
|
||||
|
||||
@@ -11,12 +11,17 @@
|
||||
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* The interface for an object that a style can be added to.
|
||||
* @namespace Blockly.IStyleable
|
||||
*/
|
||||
goog.module('Blockly.IStyleable');
|
||||
|
||||
|
||||
/**
|
||||
* Interface for an object that a style can be added to.
|
||||
* @interface
|
||||
* @alias Blockly.IStyleable
|
||||
*/
|
||||
const IStyleable = function() {};
|
||||
|
||||
|
||||
@@ -11,6 +11,10 @@
|
||||
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* The interface for a toolbox.
|
||||
* @namespace Blockly.IToolbox
|
||||
*/
|
||||
goog.module('Blockly.IToolbox');
|
||||
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
@@ -29,6 +33,7 @@ const toolbox = goog.requireType('Blockly.utils.toolbox');
|
||||
* Interface for a toolbox.
|
||||
* @extends {IRegistrable}
|
||||
* @interface
|
||||
* @alias Blockly.IToolbox
|
||||
*/
|
||||
const IToolbox = function() {};
|
||||
|
||||
|
||||
@@ -11,12 +11,17 @@
|
||||
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* The interface for a toolbox item.
|
||||
* @namespace Blockly.IToolboxItem
|
||||
*/
|
||||
goog.module('Blockly.IToolboxItem');
|
||||
|
||||
|
||||
/**
|
||||
* Interface for an item in the toolbox.
|
||||
* @interface
|
||||
* @alias Blockly.IToolboxItem
|
||||
*/
|
||||
const IToolboxItem = function() {};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user