Skip to content

Commit 9bb5f83

Browse files
committed
Killed suppressImplicitAnyIndexErrors with 🔥
1 parent 2d40152 commit 9bb5f83

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/geojson-layer.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ export interface Props {
2323
fillPaint?: MapboxGL.FillPaint;
2424
}
2525

26+
type Paints = MapboxGL.LinePaint | MapboxGL.SymbolPaint | MapboxGL.CirclePaint | MapboxGL.FillPaint;
27+
type Layouts = MapboxGL.FillLayout | MapboxGL.LineLayout | MapboxGL.CircleLayout | MapboxGL.SymbolLayout;
28+
2629
export interface Context {
2730
map: MapboxGL.Map;
2831
}
@@ -52,8 +55,8 @@ export default class GeoJSONLayer extends React.Component<Props, void> {
5255
const layerId = `${id}-${type}`;
5356
layerIds.push(layerId);
5457

55-
const paint = this.props[`${type}Paint`] || {};
56-
const layout = this.props[`${type}Layout`] || {};
58+
const paint: Paints = this.props[`${type}Paint`] || {};
59+
const layout: Layouts = this.props[`${type}Layout`] || {};
5760

5861
map.addLayer({
5962
id: layerId,

0 commit comments

Comments
 (0)