nitaliano / react-native-mapbox-gl

A Mapbox GL react native module for creating custom maps
Other
2.16k stars 697 forks source link

type differences on coordinates #1559

Closed lauherk closed 5 years ago

lauherk commented 5 years ago

looking at index.d.ts, i've noticed that for coordinates, it's always of typeArray<number>. for example,

interface MapViewProps extends ViewProperties { centerCoordinate?: Array<number>; ...... }

however, looking at the type for PointAnnotationProps, i see that coordinate: Array<string>. Example: interface PointAnnotationProps { coordinate: Array<string>; ... }

is there a reason for this? It seems to make sense to me for everything to be Array<number>, but i wanted to ask here first as this is causing type errors. Thanks a ton in advance for the help! 😄

nitaliano commented 5 years ago

It's just a typo for sure it should be Array<number>

kristfal commented 5 years ago

Should be Array. Feel free to open a PR with a fix.

lauherk commented 5 years ago

thanks so much for the feedback! I will open a pr tonight 👍 😄