Reference · Collections and piles: pure helpers
CollectionCardtype
One item of a collection: an id, a name, the front's picture, optionally the back's, its kind and its metadata.
Import it
import type { CollectionCard } from "@johnmorrisdotca/fuda-cards/collection";
Definition
interface CollectionCard {
id: string;
name: string;
image: string;
backImage?: string;
kind?: CollectionKind;
metadata?: CollectionMetadata;
}
Members
| Name | Type | Description |
|---|---|---|
id | string | |
name | string | |
image | string | |
backImage (optional) | string | undefined | |
kind (optional) | CollectionKind | undefined | |
metadata (optional) | CollectionMetadata | undefined |
Examples
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 OneWhat it prints (run when this page was built)