UNPKG

@blockly/block-shareable-procedures

Version:
39 lines 1.27 kB
/** * @license * Copyright 2022 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import * as Blockly from 'blockly/core'; import { ProcedureBase, ProcedureBaseJson } from './events_procedure_base'; /** * Notifies listeners that a procedure data model has been deleted. */ export declare class ProcedureDelete extends ProcedureBase { static readonly TYPE = "procedure_delete"; /** A string used to check the type of the event. */ type: string; /** * Replays the event in the workspace. * * @param forward if true, play the event forward (redo), otherwise play it * backward (undo). */ run(forward: boolean): void; /** * Encode the event as JSON. * * @returns JSON representation. */ toJson(): ProcedureDeleteJson; /** * Deserializes the JSON event. * * @param json The JSON representation of a procedure delete event. * @param workspace The workspace to deserialize the event into. * @returns The new procedure delete event. * @internal */ static fromJson(json: ProcedureDeleteJson, workspace: Blockly.Workspace): ProcedureDelete; } export type ProcedureDeleteJson = ProcedureBaseJson; //# sourceMappingURL=events_procedure_delete.d.ts.map