blockly > Connection > setCheck
Connection.setCheck() method
Change a connection's compatibility.
Signature:
setCheck(check: string | string[] | null): Connection;
Parameters
Parameter |
Type |
Description |
check |
string | string[] | null |
Compatible value type or list of value types. Null if all types are compatible. |
Returns:
Connection
The connection being modified (to allow chaining).
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-09-18 UTC.
[null,null,["Last updated 2024-09-18 UTC."],[[["The `Connection.setCheck()` method modifies a connection to only accept specific data types or a list of data types."],["By setting the `check` parameter, you define the compatible value types for the connection, ensuring only blocks with matching data types can connect."],["Setting `check` to `null` makes the connection compatible with any data type."],["The method returns the modified `Connection` object, enabling method chaining for further operations."]]],[]]