Skip to content

JSCollectionExtensions.AsReadOnlySet<T> method

Creates a read-only set adapter for a JS Set object, without copying.

C#
public static IReadOnlySet<T> AsReadOnlySet<T>(this JSSet set, To<T> fromJS, From<T> toJS)

Remarks

This method must be called from the JS thread. The returned set object is thread-safe and may be accessed from threads other than the JS thread (though accessing from the JS thread is more efficient).

See Also

Released under the MIT license