MCPcopy
hub / github.com/RaspberryPiFoundation/blockly / getInputTargetBlock

Method getInputTargetBlock

packages/blockly/core/block.ts:2325–2328  ·  view source on GitHub ↗

* Fetches the block attached to the named input. * * @param name The name of the input. * @returns The attached value block, or null if the input is either * disconnected or if the input does not exist.

(name: string)

Source from the content-addressed store, hash-verified

2323 * disconnected or if the input does not exist.
2324 */
2325 getInputTargetBlock(name: string): Block | null {
2326 const input = this.getInput(name);
2327 return input && input.connection && input.connection.targetBlock();
2328 }
2329
2330 /**
2331 * Returns the comment on this block (or null if there is no comment).

Callers 15

valueToCodeMethod · 0.80
statementToCodeMethod · 0.80
text.tsFile · 0.80
lists.tsFile · 0.80
procedures.tsFile · 0.80
logic.tsFile · 0.80
block_test.jsFile · 0.80
assertBlockIsOnlyChildFunction · 0.80
assertNonParentAndOrphanFunction · 0.80
assertInputHasBlockFunction · 0.80
assertInputNotHasBlockFunction · 0.80
connection_test.jsFile · 0.80

Calls 2

getInputMethod · 0.95
targetBlockMethod · 0.45

Tested by

no test coverage detected