As far as I can tell a JS SharedArrayBuffer can enter IDL through an IDL ArrayBuffer that's effectively a pointer to the JS object.
Now assuming #342 is fixed and you can use [AllowShared] ArrayBuffer as return value, what language do you use to return a SharedArrayBuffer? Do you need to construct the JS object, then make an IDL ArrayBuffer object that points to it, and then return the IDL object?