-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathglobal.d.ts
More file actions
60 lines (55 loc) · 1.29 KB
/
global.d.ts
File metadata and controls
60 lines (55 loc) · 1.29 KB
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
export {};
// 전역스코프에 타입 확장
declare global {
interface Window {
kakao: Kakao;
}
interface Kakao {
maps: {
load(callback: () => void): void;
Map: new (
container: HTMLElement,
options: {
center: LatLng;
level: number;
draggable?: boolean;
scrollwheel?: boolean;
disableDoubleClick?: boolean;
disableDoubleClickZoom?: boolean;
},
) => KakaoMap;
LatLng: new (lat: number | string, lng: number | string) => LatLng;
Marker: new (options: { map: KakaoMap; position: LatLng }) => KakaoMarker;
services: {
Geocoder: new () => {
addressSearch(
address: string,
callback: (
result: Array<{
x: string;
y: string;
}>,
status: string,
) => void,
): void;
};
Status: {
OK: string;
};
};
};
}
interface LatLng {
getLat(): number;
getLng(): number;
}
interface KakaoMap {
setCenter(latlng: LatLng): void;
setLevel(level: number): void;
getCenter(): LatLng;
}
interface KakaoMarker {
setMap(map: KakaoMap | null): void;
setPosition(latlng: LatLng): void;
}
}