CollectionCard型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
One item of a collection: an id, a name, the front's picture, optionally the back's, its kind and its metadata.
インポート
import type { CollectionCard } from "@johnmorrisdotca/fuda-cards/collection";
定義
interface CollectionCard {
id: string;
name: string;
image: string;
backImage?: string;
kind?: CollectionKind;
metadata?: CollectionMetadata;
}
メンバー
| 名前 | 型 | 説明 |
|---|---|---|
id | string | |
name | string | |
image | string | |
backImage (省略可) | string | undefined | |
kind (省略可) | CollectionKind | undefined | |
metadata (省略可) | CollectionMetadata | undefined |
例
import { type CollectionCard } from "@johnmorrisdotca/fuda-cards/collection";
const card: CollectionCard = { id: "1", name: "Explorer One", image: "front.jpg", backImage: "back.jpg" };
console.log(card.name); // Explorer OneExplorer One出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。