We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 34ca5f2 commit 61a03b4Copy full SHA for 61a03b4
README.md
@@ -103,6 +103,10 @@ sharedBox.x = 42; // x is declared and rhs is primitive
103
sharedBox.x = sharedBox2; // x is declared and rhs is shared
104
assertThrows(() => { sharedBox.x = {}; }) // rhs is not a shared struct
105
106
+// can programmatically test if a value can be shared
107
+assert(Reflect.canBeShared(sharedBox2));
108
+assert(!Reflect.canBeShared({}));
109
+
110
let worker = new Worker('worker.js');
111
worker.postMessage({ sharedBox });
112
0 commit comments