mirror of
https://github.com/google/blockly.git
synced 2026-01-08 09:30:06 +01:00
* chore(deps): Add pretter-plugin-organize-imports * chore: Remove insignificant blank lines in import sections Since prettier-plugin-organize-imports sorts imports within sections separated by blank lines, but preserves the section divisions, remove any blank lines that are not dividing imports into meaningful sections. Do not remove blank lines separating side-effect-only imports from main imports. * chore: Remove unneded eslint-disable directives * chore: Organise imports
29 lines
825 B
TypeScript
29 lines
825 B
TypeScript
/**
|
|
* @license
|
|
* Copyright 2022 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
|
|
// Former goog.module ID: Blockly.procedures.IProcedureBlock
|
|
|
|
import type {Block} from '../block.js';
|
|
import {IProcedureModel} from './i_procedure_model.js';
|
|
|
|
/** The interface for a block which models a procedure. */
|
|
export interface IProcedureBlock {
|
|
getProcedureModel(): IProcedureModel;
|
|
doProcedureUpdate(): void;
|
|
isProcedureDef(): boolean;
|
|
}
|
|
|
|
/** A type guard which checks if the given block is a procedure block. */
|
|
export function isProcedureBlock(
|
|
block: Block | IProcedureBlock,
|
|
): block is IProcedureBlock {
|
|
return (
|
|
(block as IProcedureBlock).getProcedureModel !== undefined &&
|
|
(block as IProcedureBlock).doProcedureUpdate !== undefined &&
|
|
(block as IProcedureBlock).isProcedureDef !== undefined
|
|
);
|
|
}
|