CollectionMetadata型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
What a collector writes about a card: its set, year, number, edition, condition, grade, quantity and notes. All optional; year and quantity are whole numbers.
インポート
import type { CollectionMetadata } from "@johnmorrisdotca/fuda-cards/collection";
定義
interface CollectionMetadata {
set?: string;
year?: number;
number?: string;
edition?: string;
condition?: string;
grade?: string;
quantity?: number;
notes?: string;
}
メンバー
| 名前 | 型 | 説明 |
|---|---|---|
set (省略可) | string | undefined | |
year (省略可) | number | undefined | |
number (省略可) | string | undefined | |
edition (省略可) | string | undefined | |
condition (省略可) | string | undefined | |
grade (省略可) | string | undefined | |
quantity (省略可) | number | undefined | |
notes (省略可) | string | undefined |
例
import { parseCollection, type CollectionMetadata } from "@johnmorrisdotca/fuda-cards/collection";
const metadata: CollectionMetadata = { set: "Base", year: 1999, quantity: 2 };
console.log(parseCollection([{ name: "Card", image: "c.jpg", metadata }])[0].metadata);
// { set: 'Base', year: 1999, quantity: 2 }{ set: 'Base', year: 1999, quantity: 2 }出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。