Skip to main content

Home > 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): IVariableModel<IVariableState> | null;

Parameters

ParameterTypeDescription
namestringThe name to search for.
workspaceWorkspaceThe workspace to search for the variable.

Returns:

IVariableModel<IVariableState> | null

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