mirror of
https://github.com/visgl/react-map-gl.git
synced 2026-01-18 15:54:22 +00:00
fix missing types (#2259)
This commit is contained in:
parent
bfcc893b4e
commit
c09485ed5d
@ -40,7 +40,7 @@ export default function createRef<
|
||||
StyleT extends MapStyle,
|
||||
CallbacksT extends Callbacks,
|
||||
MapT extends MapInstance
|
||||
>(mapInstance: Mapbox<StyleT, CallbacksT, MapT>): MapRef<MapT> {
|
||||
>(mapInstance: Mapbox<StyleT, CallbacksT, MapT>): MapRef<MapT> | null {
|
||||
if (!mapInstance) {
|
||||
return null;
|
||||
}
|
||||
@ -90,7 +90,7 @@ export default function createRef<
|
||||
return result;
|
||||
}
|
||||
|
||||
function getMethodNames(obj) {
|
||||
function getMethodNames(obj: Object) {
|
||||
const result = new Set<string>();
|
||||
|
||||
let proto = obj;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user