Optional
markerThe marker for the Emp type, used to distinguish between multiple types
Typically, this is a unique symbol:
const MyNativeType = Symbol("MyNativeType");
export type MyNativeType = typeof MyNativeType;
const makeMyNativeTypeEmp = makeEmpType({
marker: MyNativeType,
free: (ptr) => void freeMyNativeType(ptr)
})
Note that this is not used in runtime, but just used for type inference, so you can also skip passing it and specify the type parameter instead
Function to free the underlying object. Called when this Emp is garbage-collected