DefinitelyTyped/types/japan-postal-code/index.d.ts
TokugawaT_YD 19950d0f4e
New typings: japan-postal-code (#42700)
* clear to tests

* Clear to tests

* Failing tests fix

* fix failing tests

* fix failing tests

* fix failing tests
2020-02-28 10:24:50 -08:00

32 lines
736 B
TypeScript

// Type definitions for japan-postal-code 0.2
// Project: https://github.com/mzp/japan-postal-code
// Definitions by: Takesi Tokugawa <https://github.com/TokugawaTakesi>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
export as namespace JapanPostalCodeLibrary;
export = JapanPostalCode;
declare const JapanPostalCode: JapanPostalCode.API;
declare namespace JapanPostalCode {
interface API {
get: FetchPostalCodeMethod;
}
interface FetchPostalCodeMethod {
(stringifiedPostalCode: string, callback: Callback): void;
}
interface Callback {
(addressData: AddressData): void;
}
interface AddressData {
prefecture: string;
city: string;
area: string;
street: string;
}
}