index.d.ts 1.78 KB
Newer Older
박상호's avatar
from jw    
박상호 committed
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
declare module "react-daum-postcode" {
  import * as React from "react";

  type AddressData = {
    zonecode: string;
    address: string;
    addressEnglish: string;
    addressType: "R" | "J";
    userSelectedType: "R" | "J";
    userLanguageType: "K" | "E";
    roadAddress: string;
    roadAddressEnglish: string;
    jibunAddress: string;
    jibunAddressEnglish: string;
    autoRoadAddress: string;
    autoRoadAddressEnglish: string;
    autoJibunAddress: string;
    autoJibunAddressEnglish: string;
    buildingCode: string;
    buildingName: string;
    apartment: "Y" | "N"
    sido: string;
    sigungu: string;
    sigunguCode: string;
    roadnameCode: string;
    bcode: string;
    roadname: string;
    bname: string;
    bname1: string;
    bname2: string;
    hname: string;
    query: string;
    noSelected: "Y" | "N";
  }

  type SearchData = {
    q: string;
    count: number;
  }

  type DaumPostcodeProps = {
    onComplete(data: AddressData): void;
    onSearch?(data: SearchData): void;
    alwaysShowEngAddr?: boolean;
    animation?: boolean;
    autoClose?: boolean;
    autoMapping?: boolean;
    autoResize?: boolean;
    defaultQuery?: string;
    errorMessage?: React.ReactElement<any>
    height?: number | string;
    hideEngBtn?: boolean;
    hideMapBtn?: boolean;
    maxSuggestItems?: number;
    pleaseReadGuide?: number;
    pleaseReadGuideTimer?: number;
    scriptUrl?: string;
    shorthand?: boolean;
    showMoreHName?: boolean;
    style?: object;
    theme?: object;
    useSuggest?: boolean;
    width?: number | string;
    submitMode?: boolean;
    focusInput?: boolean,
    focusContent?: boolean,
  }

  class DaumPostcode extends React.Component<DaumPostcodeProps, any> {}

  export { AddressData, DaumPostcodeProps, DaumPostcode };

  export default DaumPostcode;
}