UNPKG

pxt-core

Version:

Microsoft MakeCode provides Blocks / JavaScript / Python tools and editors

36 lines (35 loc) 1.3 kB
import * as Blockly from "blockly"; import { InlineSvgsExtensionBlock } from "../functions"; declare type ListCreateMixinType = typeof LIST_CREATE_MIXIN; interface ListCreateMixin extends ListCreateMixinType { } export declare type ListCreateBlock = InlineSvgsExtensionBlock & ListCreateMixin; declare const LIST_CREATE_MIXIN: { valueConnections_: Blockly.Connection[]; horizontalAfter_: number; itemCount_: number; /** * Create XML to represent list inputs. * @return {!Element} XML storage element. * @this {Blockly.Block} */ mutationToDom: (this: ListCreateBlock) => Element; /** * Parse XML to restore the list inputs. * @param {!Element} xmlElement XML storage element. * @this {Blockly.Block} */ domToMutation: (this: ListCreateBlock, xmlElement: Element) => void; storeConnections_: (this: ListCreateBlock) => void; restoreConnections_: (this: ListCreateBlock) => void; addItem_: (this: ListCreateBlock) => void; removeItem_: (this: ListCreateBlock) => void; update_: (this: ListCreateBlock, update: () => void) => void; /** * Modify this block to have the correct number of inputs. * @private * @this {Blockly.Block} */ updateShape_: (this: ListCreateBlock) => void; }; export {};