gi-nx / getBlocks
ts
function getBlocks(): Record<string, {
description?: string;
features: (
| PreStackedPoint
| PreStackedLineString
| PreStackedPolygon<Record<string, any>>)[];
id: string;
keyWords?: string[];
name: string;
properties?: Record<string, any>;
}>;Returns all block definitions, keyed by id.
Returns
Record<string, { description?: string; features: ( | PreStackedPoint | PreStackedLineString | PreStackedPolygon<Record<string, any>>)[]; id: string; keyWords?: string[]; name: string; properties?: Record<string, any>; }>
Example
ts
const blocks = gi.getBlocks();
console.log(Object.keys(blocks)); // ["94d84733617e4c2d91b87a4da6106e8a", ...]