UNPKG

@do-kevin/pc-vn

Version:

Type-safe & simple utility library for searching and filtering Vietnam's localities.

32 lines (31 loc) 815 B
import type { DistrictFunction } from '../types/district'; /** * Retrieve a list of all districts. */ export declare const getDistricts: () => { code: string; name: string; unit: string; province_code: string; province_name: string; full_name: string; }[]; /** * Retrieve a list of districts based on province code. * @param provinceCode - string value of province_code * @returns List of districts * @example * `getDistrictsByProvinceCode('96')` * ##### Result: * ``` * [{ * code: '968', * name: 'Huyện Trần Văn Thời', * unit: 'Huyện', * province_code: '96', * province_name: 'Tỉnh Cà Mau', * full_name: 'Huyện Trần Văn Thời, Tỉnh Cà Mau' * }, ...] * ``` */ export declare const getDistrictsByProvinceCode: DistrictFunction;