Skip to content

Commit

Permalink
fix: type EventEmitter
Browse files Browse the repository at this point in the history
  • Loading branch information
lvisei committed May 6, 2024
1 parent 048c203 commit 3f508ff
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/maps/src/lib/base-map.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import type {
MapStyleName,
} from '@antv/l7-core';
import { CoordinateSystem } from '@antv/l7-core';
import type { EventEmitterStatic } from 'eventemitter3';
import { EventEmitter } from 'eventemitter3';
import { SimpleMapCoord } from '../utils/simpleMapCoord';

Expand Down Expand Up @@ -45,7 +46,7 @@ export default abstract class BaseMap<T> implements IMapService<T> {

protected readonly coordinateSystemService: ICoordinateSystemService;

protected eventEmitter = new EventEmitter();
protected eventEmitter: InstanceType<EventEmitterStatic>;

protected markerContainer: HTMLElement;

Expand All @@ -57,6 +58,7 @@ export default abstract class BaseMap<T> implements IMapService<T> {
this.config = container.mapConfig as Partial<IMapConfig<T>>;
this.configService = container.globalConfigService;
this.coordinateSystemService = container.coordinateSystemService;
this.eventEmitter = new EventEmitter();
}

public abstract init(): Promise<void>;
Expand Down

0 comments on commit 3f508ff

Please sign in to comment.