Skip to content

Commit

Permalink
fix older versions
Browse files Browse the repository at this point in the history
  • Loading branch information
mmomtchev committed Feb 26, 2024
1 parent e7909bf commit ea80e50
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/layer/RLayerBaseVector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ import JSONFeature from 'ol/format/JSONFeature';
export const featureHandlersSymbol = '_rlayers_feature_handlers';
export type FeatureHandlers = Record<OLEvent, number>;

type IfAny<T, Y, N> = 0 extends 1 & T ? Y : N;
// This is very hackish, maybe it is time to drop older OpenLayers versions
type OLFeatureType<F extends OLFeatureClass> = RenderFeature extends ReturnType<
JSONFeature['readFeatures']
Expand All @@ -38,7 +37,7 @@ type OLFeatureType<F extends OLFeatureClass> = RenderFeature extends ReturnType<
F
: // eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
IfAny<OLVectorTileOptions<FeatureLike>, Geometry, F<Geometry>>;
F<Geometry>;

/**
* @propsfor RLayerBaseVector
Expand Down

0 comments on commit ea80e50

Please sign in to comment.