blockly > VariableMap > getVariableById

เมธอด VariableMap.getVariableById()

ค้นหาตัวแปรตามรหัสที่ระบุและแสดงผล แสดงผล Null หากไม่พบ

ลายเซ็น:

getVariableById(id: string): IVariableModel<IVariableState> | null;

พารามิเตอร์

พารามิเตอร์ ประเภท คำอธิบาย
id สตริง รหัสที่จะตรวจสอบ

การคืนสินค้า:

IVariableModel<IVariableState> | null

ตัวแปรที่มีรหัสที่ระบุ