UNPKG

pxt-core

Version:

Microsoft MakeCode provides Blocks / JavaScript / Python tools and editors

24 lines (23 loc) 1.95 kB
import * as Blockly from "blockly"; import { CommonFunctionBlock } from "./commonFunctionMixin"; export declare type StringMap<T> = { [index: string]: T; }; export declare function rename(this: Blockly.FieldTextInput, name: string): string; export declare function getDefinition(name: string, workspace: Blockly.Workspace): CommonFunctionBlock; export declare function getAllFunctionDefinitionBlocks(workspace: Blockly.Workspace): CommonFunctionBlock[]; export declare function isCustomType(argumentType: string): boolean; export declare function createCustomArgumentReporter(typeName: string, ws: Blockly.Workspace): Blockly.Block; export declare function createCustomArgumentEditor(typeName: string, ws: Blockly.Workspace): Blockly.Block; export declare function findLegalName(name: string, ws: Blockly.Workspace, block?: CommonFunctionBlock): string; export declare function idsInUse(ws: Blockly.Workspace): string[]; export declare function mutateCallersAndDefinition(name: string, ws: Blockly.Workspace, mutation: Element): void; export declare function getArgMap(mutation: Element, inverse: boolean): StringMap<string>; export declare function isFunctionArgumentReporter(block: Blockly.Block): boolean; export declare function doArgumentReporterDragChecks(a: Blockly.RenderedConnection, b: Blockly.RenderedConnection, distance: number): boolean; export declare function getArgumentReporterParent(reporter: Blockly.Block, location: Blockly.Block): Blockly.Block | undefined; export declare function findUniqueParamName(name: string, paramNames: string[]): string; export declare function getShadowBlockInfoFromType_(argumentType: string, ws: Blockly.Workspace): string[]; export declare function flyoutCategory(workspace: Blockly.WorkspaceSvg): Element[]; export declare function validateFunctionExternal(mutation: Element, destinationWs: Blockly.Workspace): boolean; export declare function isVariableBlockType(type: string): boolean;