Skip to content

Instantly share code, notes, and snippets.

@ProductiveRage
Created December 18, 2015 12:14
Show Gist options
  • Save ProductiveRage/2351c4cc924614d7f4a3 to your computer and use it in GitHub Desktop.
Save ProductiveRage/2351c4cc924614d7f4a3 to your computer and use it in GitHub Desktop.
The start of a binding for the Immutable-Js list for Bridge.NET
using Bridge;
namespace BridgeImmutableJsBinding.ImmutableJsBindings
{
[Name("Immutable.List")]
[Ignore]
public static class List
{
[Ignore]
public extern static ImmutableList<T> Of<T>(params T[] values);
}
[Ignore]
public sealed class ImmutableList<T>
{
private ImmutableList() { } // This should never be instantiated directly
public extern T this[int index] { [Template("get({0})")] get; }
public extern int Count { [Name("count")] get; }
[Ignore]
public extern ImmutableList<T> Push(params T[] values);
[Ignore]
public extern ImmutableList<T> Pop();
[Ignore]
public extern T[] ToArray();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment