UNPKG

hududlar

Version:

O'zbekiston hududlari: viloyatlar, tumanlar, qishloqlar uchun TypeScript kutubxonasi

49 lines (46 loc) 1.4 kB
interface Region { id: number; soato_id: number; name_uz: string | null; name_oz: string | null; name_ru: string | null; } interface District { id: number; region_id: number; soato_id: number; name_uz: string | null; name_oz: string | null; name_ru: string | null; } interface Village { id: number; district_id: number; soato_id: number; name_uz: string | null; name_oz: string | null; name_ru: string | null; } declare function getRegions(): Region[]; declare function getDistrictsByRegionId(regionId: number): District[]; declare function getVillagesByDistrictId(districtId: number): Village[]; declare function findRegionById(id: number): Region | undefined; declare function findDistrictById(id: number): District | undefined; declare function findVillageById(id: number): Village | undefined; declare function getRegionTree(): { districts: { villages: Village[]; id: number; region_id: number; soato_id: number; name_uz: string | null; name_oz: string | null; name_ru: string | null; }[]; id: number; soato_id: number; name_uz: string; name_oz: string; name_ru: string; }[]; export { District, Region, Village, findDistrictById, findRegionById, findVillageById, getDistrictsByRegionId, getRegionTree, getRegions, getVillagesByDistrictId };