Skip to content

Commit

Permalink
Fix typechecking (visgl#1798) (visgl#2250)
Browse files Browse the repository at this point in the history
  • Loading branch information
trumbitta authored Aug 11, 2023
1 parent 07065f7 commit 6e166cf
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/components/use-map.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,10 @@ export const MapProvider: React.FC<{children?: React.ReactNode}> = props => {
);
};

export function useMap<MapT extends MapInstance>() {
export function useMap<MapT extends MapInstance>(): {
[id: string]: MapRef<MapT> | undefined;
current?: MapRef<MapT>;
} {
const maps = useContext(MountedMapsContext)?.maps;
const currentMap = useContext(MapContext);

Expand Down

0 comments on commit 6e166cf

Please sign in to comment.