Skip to content
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

Improve typings by adding strict tsconfig.json #363

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 0 additions & 2 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,6 @@
noClear: this.props.noClear,
styles: this.props.styles,
gestureHandling: this.props.gestureHandling,
draggableCursor: this.props.draggableCursor,
draggingCursor: this.props.draggingCursor
});

Expand Down Expand Up @@ -408,7 +407,6 @@
fullscreenControl: _propTypes2.default.bool,
scrollwheel: _propTypes2.default.bool,
draggable: _propTypes2.default.bool,
draggableCursor: _propTypes2.default.string,
keyboardShortcuts: _propTypes2.default.bool,
disableDoubleClickZoom: _propTypes2.default.bool,
noClear: _propTypes2.default.bool,
Expand Down
7 changes: 4 additions & 3 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ export interface IProvidedProps {
loaded?: boolean
}

type mapEventHandler = (mapProps?: IMapProps, map?: google.maps.Map, event?) => any
type mapEventHandler = (mapProps?: IMapProps, map?: google.maps.Map, event?: google.maps.MouseEvent) => void

type Style = Object<string, string | number | boolean>
type Style = Record<string, string | number | boolean>

export interface IMapProps extends google.maps.MapOptions {
google: GoogleAPI
Expand All @@ -39,6 +39,7 @@ export interface IMapProps extends google.maps.MapOptions {
centerAroundCurrentLocation?: boolean
initialCenter?: google.maps.LatLngLiteral
center?: google.maps.LatLngLiteral
zoom?: number

visible?: boolean

Expand All @@ -64,7 +65,7 @@ export interface IMapProps extends google.maps.MapOptions {
onZoomChanged?: mapEventHandler
}

type markerEventHandler = (props?: IMarkerProps, marker?: google.maps.Marker, event?) => any
type markerEventHandler = (props?: IMarkerProps, marker?: google.maps.Marker, event?: google.maps.MouseEvent) => any

export interface IMarkerProps extends Partial<google.maps.MarkerOptions> {
mapCenter?: google.maps.LatLng | google.maps.LatLngLiteral
Expand Down