Stay organized with collections Save and categorize content based on your preferences.

blockly > CodeGenerator > valueToCode

CodeGenerator.valueToCode() method

Generate code representing the specified value input.

Signature:

valueToCode(block: Block, name: string, outerOrder: number): string;

Parameters

Parameter Type Description
block Block The block containing the input.
name string The name of the input.
outerOrder number The maximum binding strength (minimum order value) of any operators adjacent to "block".

Returns:

string

Generated code or '' if no blocks are connected or the specified input does not exist.