blockly > Variables > nameUsedWithAnyType

Variables.nameUsedWithAnyType() function

Check whether there exists a variable with the given name of any type.

Signature:

export declare function nameUsedWithAnyType(name: string, workspace: Workspace): VariableModel | null;

Parameters

Parameter Type Description
name string The name to search for.
workspace Workspace The workspace to search for the variable.

Returns:

VariableModel | null

The variable with the given name, or null if none was found.