blockly > ตัวแปร > nameUsedWithAnyType
ฟังก์ชัน variable.nameUsedWithAnyType()
ตรวจสอบว่ามีตัวแปรที่มีชื่อที่ระบุของประเภทใดๆ หรือไม่
ลายเซ็น:
export declare function nameUsedWithAnyType(name: string, workspace: Workspace): VariableModel | null;
พารามิเตอร์
พารามิเตอร์ | Type | คำอธิบาย |
---|---|---|
ชื่อ | สตริง | ชื่อที่จะค้นหา |
พื้นที่ทำงาน | พื้นที่ทำงาน | พื้นที่ทำงานสำหรับค้นหาตัวแปร |
ส่งกลับ:
VariableModel | null
ตัวแปรที่มีชื่อที่ระบุ หรือค่าว่างหากไม่พบ