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

1.1.3 • Public • Published

Installation

npm install --save @types/node-postal

Summary

This package contains type definitions for node-postal (https://github.com/openvenues/node-postal).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node-postal.

index.d.ts

// Source: https://github.com/openvenues/libpostal#parser-labels
export type PostalLabels =
    | "category"
    | "city_district"
    | "city"
    | "country_region"
    | "country"
    | "entrance"
    | "house_number"
    | "house"
    | "island"
    | "level"
    | "near"
    | "po_box"
    | "postcode"
    | "road"
    | "staircase"
    | "state_district"
    | "state"
    | "suburb"
    | "unit"
    | "world_region";

export interface PostalResult {
    component: PostalLabels;
    value: string;
}

declare function expand_address(address: string): string[];

declare function parse_address(address: string): PostalResult[];

export const expand: {
    expand_address: typeof expand_address;
};

export const parser: {
    parse_address: typeof parse_address;
};

export {};

Additional Details

  • Last updated: Tue, 07 Nov 2023 09:09:39 GMT
  • Dependencies: none

Credits

These definitions were written by João Carmo.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/node-postal

Weekly Downloads

1,650

Version

1.1.3

License

MIT

Unpacked Size

4.13 kB

Total Files

5

Last publish

Collaborators

  • types