Skip to content

Commit

Permalink
Re-export AddressRecord type
Browse files Browse the repository at this point in the history
  • Loading branch information
cblanc committed Apr 6, 2018
1 parent c3a7752 commit 6a0db79
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion lib/index.d.ts
Expand Up @@ -32,10 +32,11 @@ export declare class Address {
readonly longitude: number | t.EmptyString;
readonly latitude: number | t.EmptyString;
private cache;
constructor(data: t.AddressRecord);
constructor(data: AddressRecord);
raw(): t.RawAddress;
toJSON(): t.AddressJSON;
formattedAddress(): t.FormattedAddress;
static formatPostcode(postcode: string): string;
static sort(a: Address, b: Address): Number;
}
export declare type AddressRecord = t.AddressRecord;
6 changes: 4 additions & 2 deletions src/index.ts
Expand Up @@ -108,9 +108,9 @@ export class Address {
* // "197a Elm Road"
* // "199 Elm Road"
* ```
* @param {t.AddressRecord} data
* @param {AddressRecord} data
*/
constructor (data: t.AddressRecord) {
constructor (data: AddressRecord) {
this.postcode = extract(data, "postcode");
this.post_town = extract(data, "post_town").toUpperCase();
this.dependant_locality = extract(data, "dependant_locality");
Expand Down Expand Up @@ -243,3 +243,5 @@ export class Address {
return sort(a, b);
}
}

export type AddressRecord = t.AddressRecord;

0 comments on commit 6a0db79

Please sign in to comment.