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

Method getIndex

packages/blockly/core/inputs/input.ts:437–444  ·  view source on GitHub ↗

* Returns the index of this input, excluding inputs without connections, on its * source block. * * @internal

()

Source from the content-addressed store, hash-verified

435 * @internal
436 */
437 getIndex(): number {
438 const noConnectionInputTypes = [inputTypes.DUMMY, inputTypes.END_ROW];
439 const allInputs = this.getSourceBlock().inputList;
440 const allConnectionInputs = allInputs.filter(
441 (input) => !noConnectionInputTypes.includes(input.type),
442 );
443 return allConnectionInputs.indexOf(this);
444 }
445}

Callers 1

getInputLabelsSubsetFunction · 0.80

Calls 1

getSourceBlockMethod · 0.95

Tested by

no test coverage detected