Files
blockly/core/interfaces/i_legacy_procedure_blocks.ts
dependabot[bot] f57ef73aaf chore(deps): bump @typescript-eslint/eslint-plugin from 7.17.0 to 8.0.1 (#8479)
* chore(deps): bump @typescript-eslint/eslint-plugin from 7.17.0 to 8.0.1

Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 7.17.0 to 8.0.1.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.0.1/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* fix: lint plugin versions

* chore: fix linting

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Beka Westberg <bwestberg@google.com>
2024-08-14 09:10:34 -07:00

51 lines
1.2 KiB
TypeScript

/**
* @license
* Copyright 2023 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
/**
* Legacy means of representing a procedure signature. The elements are
* respectively: name, parameter names, and whether it has a return value.
*/
export type ProcedureTuple = [string, string[], boolean];
/**
* Procedure block type.
*
* @internal
*/
export interface ProcedureBlock {
getProcedureCall: () => string;
renameProcedure: (p1: string, p2: string) => void;
getProcedureDef: () => ProcedureTuple;
}
/** @internal */
export interface LegacyProcedureDefBlock {
getProcedureDef: () => ProcedureTuple;
}
/** @internal */
export function isLegacyProcedureDefBlock(
block: object,
): block is LegacyProcedureDefBlock {
return (block as any).getProcedureDef !== undefined;
}
/** @internal */
export interface LegacyProcedureCallBlock {
getProcedureCall: () => string;
renameProcedure: (p1: string, p2: string) => void;
}
/** @internal */
export function isLegacyProcedureCallBlock(
block: object,
): block is LegacyProcedureCallBlock {
return (
(block as any).getProcedureCall !== undefined &&
(block as any).renameProcedure !== undefined
);
}