title: JsInterop - Get Value in Array
body: <p>I created my own custom array in JsInterop:</p>
  
  <pre><code>@JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Array")
  public interface Array&lt;T&gt; 
  {
      public void push(T value);
  
      @JsProperty(name = "length")
      public int getLength();
  
      @JsProperty(name = "length")
      void setLength(int newLength);
  
      @JsOverlay
      default T get(int index) {
          return JsArrayHelper.getArrayValue(this, index);
      }
  }
  </code></pre>
  
  <p>And here is the JsArrayHelper class scaled down:</p>
  
  <pre><code>public class JsArrayHelper 
  {
      //TODO: Eliminate JSNI. Better way to do this?
      public static native &lt;T&gt; T getArrayValue(Array&lt;T&gt; a, int i) /*-{
          return a[i];
      }-*/;
  }
  </code></pre>
  
  <p>Is there a better way to get the value of the array instead of using JSNI?</p>