@types/territory-indonesia
TypeScript icon, indicating that this package has built-in type declarations

0.1.2 • Public • Published

Installation

npm install --save @types/territory-indonesia

Summary

This package contains type definitions for territory-indonesia (https://github.com/eksant/territory-indonesia).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/territory-indonesia.

index.d.ts

export interface Province {
    name: string;
    id: string;
    alt_name: string;
    latitude: number | null;
    longitude: number | null;
}

export interface Regency {
    name: string;
    id: string;
    province_id: string;
    alt_name: string;
    latitude: number | null;
    longitude: number | null;
}

export interface District {
    name: string;
    id: string;
    regency_id: string;
    alt_name: string;
    latitude: number | null;
    longitude: number | null;
}

export interface Village {
    name: string;
    id: string;
    district_id: string;
    latitude: number | null;
    longitude: number | null;
}

// Province
export function getAllProvinces(): Promise<Province[]>;
export function getProvinceById(id: string): Promise<Province>;
export function getProvinceByName(name: string): Promise<Province>;

// Regency
export function getAllRegencies(): Promise<Regency[]>;
export function getRegencyById(id: string): Promise<Regency>;
export function getRegencyByName(name: string): Promise<Regency>;
export function getRegenciesOfProvince(provinceId: string): Promise<Regency[]>;
export function getRegenciesOfProvinceId(provinceId: string): Promise<Regency[]>;
export function getRegenciesOfProvinceName(provinceName: string): Promise<Regency[]>;

// District
export function getAllDistricts(): Promise<District[]>;
export function getDistrictById(id: string): Promise<District>;
export function getDistrictByName(name: string): Promise<District>;
export function getDistrictsOfRegency(regencyId: string): Promise<District[]>;
export function getDistrictsOfRegencyId(regencyId: string): Promise<District[]>;
export function getDistrictsOfRegencyName(regencyName: string): Promise<District[]>;

// Village
export function getAllVillages(): Promise<Village[]>;
export function getVillageById(id: string): Promise<Village>;
export function getVillageByName(name: string): Promise<Village>;
export function getVillagesOfDistrict(districtId: string): Promise<Village[]>;
export function getVillagesOfDistrictId(districtId: string): Promise<Village[]>;
export function getVillagesOfDistrictName(districtName: string): Promise<Village[]>;

Additional Details

  • Last updated: Tue, 07 Nov 2023 15:11:36 GMT
  • Dependencies: none

Credits

These definitions were written by Tifan.

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i @types/territory-indonesia

      Weekly Downloads

      2

      Version

      0.1.2

      License

      MIT

      Unpacked Size

      6.94 kB

      Total Files

      5

      Last publish

      Collaborators

      • types