AddressComparisonTestCase型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
A comparison case in the package's JSON test files: two addresses and the match expected.
インポート
import type { AddressComparisonTestCase } from "@johnmorrisdotca/address-plus";
定義
interface AddressComparisonTestCase extends TestCaseBase {
input: {
address1: string;
address2: string;
};
expected: {
isSame?: boolean;
similarity?: number;
differences?: string[];
[key: string]: unknown;
};
}
メンバー
| 名前 | 型 | 説明 |
|---|---|---|
input | { address1: string; address2: string; } | |
expected | { [key: string]: unknown; isSame?: boolean; similarity?: number; differences?: string[]; } | |
name (省略可) | string | undefined | |
description (省略可) | string | undefined | |
options (省略可) | Record<string, unknown> | undefined |
例
import type { AddressComparisonTestCase } from "@johnmorrisdotca/address-plus";
console.log(({ input: ["123 Main St", "123 Main Street"], expected: { isSame: true } }).expected.isSame);
// → truetrue出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。