channelDispacher function
Implementation
Pointer<JSValue> channelDispacher(
Pointer<JSContext> ctx,
int type,
Pointer<JSValue> argv,
) {
final rt = type == JSChannelType.FREE_OBJECT
? ctx.cast<JSRuntime>()
: jsGetRuntime(ctx);
final runtimeOpaque = runtimeOpaques[rt];
assert(
runtimeOpaque != null,
'The requested runtime opaque does not exist: $rt',
);
return runtimeOpaque!._channel(ctx, type, argv);
}