DefinitelyTyped/types/react-map-gl
Otto Urpelainen 32b6d5ef2a Fix callback handler inputs to use ViewportProps instead of ViewState
* Fix callback handler inputs

Based on both react-map-gl documentation and trying things out, types
ViewportChangeHandler and ViewStrateChangeHandler both receive a
ViewportProps as input, rather than ViewState as was defined. This
commit fixes that problem.

Fields that were missing include at least 'width' and 'height',
important for working with an auto-resizing map.

* [react-map-gl] ExtraState interface fix

Add missing parameters to ExtraState interface, mark all as optional.
Any or none may be included in a ExtraState object when such is used.

* [react-map-gl] New onViewStateChange inputs

Added new input parameters 'interactionState' and 'oldViewState' to
callbacks 'onViewportChange' and 'onViewStateChange' in
'MapControllerOptions', 'InteractiveMaps' and 'MapContextProps'. There
are also other places where callbacks with similar names are used. But
in those cases, the extra parameters are never used. Because of this,
there are now two different types for callback functions.
2019-10-03 15:49:20 -07:00
..
index.d.ts
react-map-gl-tests.tsx
tsconfig.json
tslint.json