forked from ldwonday/zh-address-parse
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.d.ts
More file actions
27 lines (25 loc) · 721 Bytes
/
index.d.ts
File metadata and controls
27 lines (25 loc) · 721 Bytes
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
export = zhAddressParse;
declare function zhAddressParse (address: string, option?: zhAddressParse.OptionType): zhAddressParse.ParseResult
declare namespace zhAddressParse{
export type ParseResult = {
province: string;
name: string;
city: string;
area: string;
detail: string;
phone: string;
postalCode: string;
}
export type GovData = {
code: string;
provinceCode?: string;
cityCode?: string;
name: string;
}
export type OptionType = {
type?: 0 | 1;
textFilter?: string[];
nameMaxLength?: number;
extraGovData?: Partial<Record<'province' | 'city' | 'area', GovData[]>>;
}
}