SubdivisionByNameOptionstype
What subdivisionByName() and subdivisionsByName() may be narrowed to.
Import it
import type { SubdivisionByNameOptions } from "@johnmorrisdotca/kuni/subdivisions";
Definition
interface SubdivisionByNameOptions {
country?: string;
level?: Level;
}
Members
| Name | Type | Description |
|---|---|---|
country (optional) | string | undefined | Only this country's subdivisions (alpha-2, either case). |
level (optional) | Level | undefined | Only this level; "all", the default, looks at every level. |
Examples
import type { SubdivisionByNameOptions } from "@johnmorrisdotca/kuni/subdivisions";
import { country } from "@johnmorrisdotca/kuni";
const value: SubdivisionByNameOptions = {country:"JP",level:1};
console.log(typeof value === "object" ? Object.keys(value).slice(0,6) : value);[ 'country', 'level' ]What it prints (run when this page was built)