using Jint.Native.Array;
using Jint.Runtime.Descriptors;
namespace Jint.Native;
public sealed class JsArray : ArrayInstance
{
///
/// Creates a new array instance with defaults.
///
/// The engine that this array is bound to.
/// The initial size of underlying data structure, if you know you're going to add N items, provide N.
/// Sets the length of the array.
public JsArray(Engine engine, uint capacity = 0, uint length = 0) : base(engine, capacity, length)
{
}
///
/// Possibility to construct valid array fast.
/// The array will be owned and modified by Jint afterwards.
///
public JsArray(Engine engine, JsValue[] items) : base(engine, items)
{
}
///
/// Possibility to construct valid array fast, requires that supplied array does not have holes.
/// The array will be owned and modified by Jint afterwards.
///
public JsArray(Engine engine, PropertyDescriptor[] items) : base(engine, items)
{
}
internal JsArray(Engine engine, object[] items) : base(engine, items)
{
}
}