ridder
Version:
A straightforward game engine for simple data-driven games in JavaScript
8 lines (7 loc) • 317 B
TypeScript
export type Table<T> = Readonly<Array<T>>;
/**
* Create a new table data structure.
* A table is a fixed-size read-only array that is used to store a collection of items.
* One can zero an object in the table to reuse it.
*/
export declare function table<T>(length: number, fill: (index: number) => T): Table<T>;