chore(eslint): disable types on complicated event handlers
This commit is contained in:
parent
4e218ba562
commit
96e9024694
1 changed files with 4 additions and 0 deletions
|
@ -50,12 +50,16 @@ export function useMapEvent(
|
|||
const map = useMapLibre();
|
||||
return useEffect(() => {
|
||||
if (target) {
|
||||
// event typing is hard
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
map.on(eventName as keyof MapLayerEventType, target, callback as any);
|
||||
} else {
|
||||
map.on(eventName, callback);
|
||||
}
|
||||
return () => {
|
||||
if (target) {
|
||||
// event typing is hard
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
map.off(eventName as keyof MapLayerEventType, target, callback as any);
|
||||
} else {
|
||||
map.off(eventName, callback);
|
||||
|
|
Loading…
Add table
Reference in a new issue