interface Cell { value: string; } interface Row { cells: Cell[]; } interface Part { rows: Row[]; } interface Grid { parts: Part[]; } interface Doc { grids: Grid[]; } function defaultDoc(): Doc { const defaultCells = Array(16).map(() => ({ value: "1" })); return { grids: [ { parts: [{ rows: Array(4).map(() => ({ cells: [...defaultCells] })) }] }, ], }; } export default class Notive { doc: Doc = defaultDoc(); } window.notive = new Notive(); window.dispatchEvent(new CustomEvent("ntv:initialized"));