pxt-core
Version:
Microsoft MakeCode provides Blocks / JavaScript / Python tools and editors
21 lines (20 loc) • 1.59 kB
TypeScript
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 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;