@blockly/block-shareable-procedures
Version:
A plugin that adds procedure blocks which are backed by explicit data models.
33 lines • 1.05 kB
TypeScript
/**
* @license
* Copyright 2022 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import * as Blockly from 'blockly/core';
/**
* The base event for an event associated with a procedure.
*/
export declare abstract class ProcedureBase extends Blockly.Events.Abstract {
readonly procedure: Blockly.procedures.IProcedureModel;
static readonly TYPE: string;
/** A string used to check the type of the event. */
type: string;
isBlank: boolean;
/**
* Constructs the base procedure event.
*
* @param workspace The workspace the procedure model exists in.
* @param procedure The procedure model associated with this event.
*/
constructor(workspace: Blockly.Workspace, procedure: Blockly.procedures.IProcedureModel);
/**
* Encode the event as JSON.
*
* @returns JSON representation.
*/
toJson(): ProcedureBaseJson;
}
export interface ProcedureBaseJson extends Blockly.Events.AbstractEventJson {
procedureId: string;
}
//# sourceMappingURL=events_procedure_base.d.ts.map