-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Typings for v0.21.0 #2165
Typings for v0.21.0 #2165
Conversation
@aMarCruz could you please let me know what other PRs do the same but are outdated so I can close them? 🤗 |
* 1. Allow canReplaceMapContent to be set on the JS side (via prop shouldReplaceMapContent) for iOS, MapKit only 2. Allow GoogleMaps on iOS to obey maximumZ 3. Added prop minimumZ for MapKit and GoogleMaps on iOS and Android * Removed debug NSLogs * MaximumZ was not being obeyed correctly for google maps (convert to long to compare). Get rid of compiler warnings (accidentally wrote NSUInteger instead of NSInteger) * Typings for v0.21.0 (#2165) * Update mapview.md (#2171) Add 'none' option to docs for mapType * Fixed crash for Android API level below 18 on isFromMockProvider (#2172) * Add Mock Provider boolean on each location update * Update mapview.md Update docs to specify that coordinate includes mock provider boolean * Check API is 18 or above for isFromMockProvider * Update docs to mention API * 1. Allow canReplaceMapContent to be set on the JS side (via prop shouldReplaceMapContent) for iOS, MapKit only 2. Allow GoogleMaps on iOS to obey maximumZ 3. Added prop minimumZ for MapKit and GoogleMaps on iOS and Android * Removed debug NSLogs * MaximumZ was not being obeyed correctly for google maps (convert to long to compare). Get rid of compiler warnings (accidentally wrote NSUInteger instead of NSInteger)
Hey @aMarCruz I'm wondering why you wrote the type definition for MapEvent the way you did export interface MapEvent<T = {}> extends NativeSyntheticEvent<T & {
coordinate: LatLng;
position: Point;
}> { } , instead of export interface MapEvent<T = {}> extends NativeSyntheticEvent<T> {
coordinate: LatLng;
position: Point;
} The way it is now, the Am I missing something? |
@firefueled I really don't know. May be a typo. Right now I'm not using maps but will check it next week. |
I was thinking about submitting a PR like this: type MapEventType = {
coordinate: LatLng;
position: Point;
}
export interface MapEvent<T = {}> extends NativeSyntheticEvent<T & MapEventType>, MapEventType { } but I wasn't sure if the thing you did was on purpose so I decided to ask first. |
yeah, it needs testing. |
Does any other open PR do the same thing?
I think so, but this PR is updated and more refined.
What issue is this PR fixing?
Mainly, event interface and missing methods and properties.
How did you test this PR?
Tested with VS Code in real work, but not all the typings (We are not using all).