-
Notifications
You must be signed in to change notification settings - Fork 817
/
Copy pathindex.d.ts
119 lines (95 loc) · 3.26 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
import 'googlemaps';
import * as React from 'react';
export interface GoogleApiOptions {
apiKey: string;
libraries?: string[];
client?: string;
url?: string;
version?: string;
language?: string;
region?: string;
LoadingContainer?: any;
}
export type GoogleApiOptionsFunc = (props: any) => GoogleApiOptions;
type Omit<T1, T2> = Pick<T1, Exclude<keyof T1, keyof T2>>;
export type GoogleAPI = typeof google;
export function GoogleApiWrapper(opts: GoogleApiOptions | GoogleApiOptionsFunc):
<TProps extends ProvidedProps>(ctor: React.ComponentType<TProps>) => React.ComponentType<Omit<TProps, ProvidedProps>>;
export interface ProvidedProps {
google: GoogleAPI;
loaded?: boolean;
}
type mapEventHandler = (mapProps?: MapProps, map?: google.maps.Map, event?: any) => any;
export interface MapProps extends google.maps.MapOptions {
google: GoogleAPI;
loaded?: boolean;
bounds?: google.maps.LatLngBounds | google.maps.LatLngBoundsLiteral;
centerAroundCurrentLocation?: boolean;
initialCenter?: google.maps.LatLngLiteral;
visible?: boolean;
onReady?: mapEventHandler;
onClick?: mapEventHandler;
onDragend?: mapEventHandler;
onRecenter?: mapEventHandler;
onBoundsChanged?: mapEventHandler;
onCenterChanged?: mapEventHandler;
onDblclick?: mapEventHandler;
onDragstart?: mapEventHandler;
onHeadingChange?: mapEventHandler;
onIdle?: mapEventHandler;
onMaptypeidChanged?: mapEventHandler;
onMousemove?: mapEventHandler;
onMouseover?: mapEventHandler;
onMouseout?: mapEventHandler;
onProjectionChanged?: mapEventHandler;
onResize?: mapEventHandler;
onRightclick?: mapEventHandler;
onTilesloaded?: mapEventHandler;
onTiltChanged?: mapEventHandler;
onZoomChanged?: mapEventHandler;
}
type markerEventHandler = (props?: MarkerProps, marker?: google.maps.Marker, event?: any) => any;
export interface MarkerProps extends Partial<google.maps.MarkerOptions> {
mapCenter?: google.maps.LatLng | google.maps.LatLngLiteral;
onClick?: markerEventHandler;
onDblclick?: markerEventHandler;
onDragend?: markerEventHandler;
onMousedown?: markerEventHandler;
onMouseout?: markerEventHandler;
onMouseover?: markerEventHandler;
onMouseup?: markerEventHandler;
onRecenter?: markerEventHandler;
}
export class Map extends React.Component<MapProps, any> {
}
export class Marker<P extends MarkerProps = MarkerProps, S = any> extends React.Component<P, S> {
marker?: google.maps.Marker;
renderMarker(): void;
getMarker(): Promise<google.maps.Marker>;
}
export class Polygon extends React.Component<any, any> {
}
export class Polyline extends React.Component<any, any> {
}
export class Circle extends React.Component<any, any> {
}
export class HeatMap extends React.Component<any, any> {
}
export interface InfoWindowProps extends Partial<google.maps.InfoWindowOptions> {
google?: typeof google;
map?: google.maps.Map;
marker?: google.maps.Marker;
mapCenter?: google.maps.LatLng | google.maps.LatLngLiteral;
visible?: boolean;
onOpen?: () => void;
onClose?: () => void;
}
export class InfoWindow<P extends InfoWindowProps = InfoWindowProps, S = any> extends React.Component<P, S> {
renderInfoWindow(): void;
openWindow(): void;
updatePosition(): void;
updateContent(): void;
closeWindow(): void;
renderChildren(): void;
}
export {};