Skip to content

Commit 9e3a756

Browse files
chrisgervangclaude
andcommitted
fix(layers): suppress eslint false positive on column-layer type assertions
The non-null assertions are required by tspc (ColumnGeometry.attributes is Record<string, BinaryAttribute>) but eslint sees Geometry's narrower type where POSITION/NORMAL are required. Suppress the lint rule with inline comments rather than removing the assertions which breaks the TypeScript build. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 4988ddf commit 9e3a756

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

modules/layers/src/column-layer/column-layer.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -386,8 +386,13 @@ export default class ColumnLayer<DataT = any, ExtraPropsT extends {} = {}> exten
386386

387387
protected _updateGeometry({diskResolution, vertices, extruded, stroked}) {
388388
const geometry = this.getGeometry(diskResolution, vertices, extruded || stroked);
389-
const positionAttribute = geometry.attributes.POSITION;
390-
const normalAttribute = geometry.attributes.NORMAL;
389+
// Assertions required: tspc resolves ColumnGeometry.attributes as Record<string, BinaryAttribute>
390+
// (key access = T | undefined) while eslint sees Geometry's narrower type (POSITION/NORMAL required).
391+
// Upstream issue: luma.gl Geometry.attributes type doesn't match subclass usage patterns.
392+
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
393+
const positionAttribute = geometry.attributes.POSITION!;
394+
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
395+
const normalAttribute = geometry.attributes.NORMAL!;
391396

392397
this.setState({
393398
fillVertexCount: positionAttribute.value.length / 3

0 commit comments

Comments
 (0)