Sha256: 0eab83a76332b3e4cb02d6f0af50c19cd1b6840b91dc42c70f34e82344073393
Contents?: true
Size: 1.67 KB
Versions: 4
Compression:
Stored size: 1.67 KB
Contents
/** * 住所の正規化結果として戻されるオブジェクト */ export interface NormalizeResult { /** 都道府県 */ pref: string; /** 市区町村 */ city: string; /** 町丁目 */ town: string; /** 正規化後の住所文字列 */ addr: string; /** 緯度。データが存在しない場合は null */ lat: number | null; /** 軽度。データが存在しない場合は null */ lng: number | null; /** * 住所文字列をどこまで判別できたかを表す正規化レベル * - 0 - 都道府県も判別できなかった。 * - 1 - 都道府県まで判別できた。 * - 2 - 市区町村まで判別できた。 * - 3 - 町丁目まで判別できた。 */ level: number; } /** * 正規化関数の {@link normalize} のオプション */ export interface Option { /** * 正規化を行うレベルを指定します。{@link Option.level} * * @see https://github.com/geolonia/normalize-japanese-addresses#normalizeaddress-string */ level: number; } /** * 住所を正規化します。 * * @param input - 住所文字列 * @param option - 正規化のオプション {@link Option} * * @returns 正規化結果のオブジェクト {@link NormalizeResult} * * @see https://github.com/geolonia/normalize-japanese-addresses#normalizeaddress-string */ export declare type Normalizer = (input: string, option?: Option) => Promise<NormalizeResult>; export declare type FetchLike = (input: string) => Promise<Response | { json: () => Promise<unknown>; }>; export declare const __internals: { fetch: FetchLike; }; export declare const normalize: Normalizer;
Version data entries
4 entries across 4 versions & 1 rubygems