Int16.From แปลงค่าต่างๆ เป็นประเภท Int16 (16-bit integer) ที่มีช่วง -32768 ถึง 32767 ใช้สำหรับข้อมูล ID เล็กหรือเมื่อต้องการประหยัด memory
=int16.from(value as any) as any
=int16.from(value as any) as any
| Argument | Type | Required | Default | Description |
|---|---|---|---|---|
| value | any | Yes | ค่าหรือรายการที่ต้องการประมวลผล |
int16.from({1, 2, 3})=int16.from({1, 2, 3})
ผลลัพธ์
int16.from(SourceData)=int16.from(SourceData)
ผลลัพธ์จากข้อมูล
let Data = {...}, Result = int16.from(Data) in Resultlet Data = {...}, Result = int16.from(Data) in Result
ผลลัพธ์สุดท้าย
ใช้สำหรับ: ข้อมูล ID เล็กหรือเมื่อต้องการประหยัด memory
ได้ ฟังก์ชันนี้ยืดหยุ่นและสามารถใช้กับประเภทข้อมูลต่างๆ
แปลงค่าเป็น 16-bit integer