แชร์ผ่าน


Type.ForFunction

วากยสัมพันธ์

Type.ForFunction(signature as record, min as number) as type

ประมาณ

สร้าง function type จาก signatureเรกคอร์ดของ ReturnType และ Parametersและ minจํานวนอาร์กิวเมนต์ต่ําสุดที่จําเป็นสําหรับการเรียกฟังก์ชัน

ตัวอย่างที่ 1

สร้างชนิดสําหรับฟังก์ชันที่ใช้พารามิเตอร์ตัวเลขชื่อ X และส่งกลับตัวเลข

การใช้งาน

Type.ForFunction([ReturnType = type number, Parameters = [X = type number]], 1)

ผลลัพธ์ของ

type function (X as number) as number