UNPKG

json-as

Version:

The only JSON library you'll need for AssemblyScript. SIMD enabled

7 lines (5 loc) 209 B
import { OBJECT, TOTAL_OVERHEAD } from "rt/common"; // @ts-ignore: decorator @inline export function idofD<T>(value: T): usize { return changetype<OBJECT>(changetype<usize>(value) - TOTAL_OVERHEAD).rtId; }