A wrapper for shared references to objects.
Unlike Rust's Arc<RwLock>, JavaScript uses reference semantics for objects, so this is primarily a type-safe wrapper that makes the sharing explicit.
Static
Create a new Shared instance.
Get a read-only reference to the value.
Get a mutable reference to the value.
Check equality with another Shared instance.
Clone this Shared instance. Note: This creates a shallow copy in JS; for deep copy, implement on T.
A wrapper for shared references to objects.
Unlike Rust's Arc<RwLock>, JavaScript uses reference semantics for objects,
so this is primarily a type-safe wrapper that makes the sharing explicit.