Create a grid from a 2-dimensional array.

const data = [
[1,2,3],
[4,5,6]
]
const g = create(data);
// { rows: 2, cols: 3 }
  • Type Parameters

    • T

    Parameters

    • array: readonly T[][] | T[][]

    Returns Grid