Reference · Parsing, formatting and shared types
BatchParseResulttype
What a batch parser returns: the results in order, the errors and the statistics.
Import it
import type { BatchParseResult } from "@johnmorrisdotca/address-plus";
Definition
interface BatchParseResult<T = ParsedAddress | ParsedIntersection> {
results: (T | null)[];
errors: BatchParseError[];
stats: BatchParseStats;
}
Members
| Name | Type | Description |
|---|---|---|
results | (T | null)[] | |
errors | BatchParseError[] | |
stats | BatchParseStats |
Examples
import { parseLocationsBatch } from "@johnmorrisdotca/address-plus";
import type { BatchParseResult } from "@johnmorrisdotca/address-plus";
console.log(parseLocationsBatch(["123 Main St, Anytown, NY 12345"]).results.length);
// → 11What it prints (run when this page was built)