elder_scrolling/src/cards/types.ts

46 lines
760 B
TypeScript

interface SetProps {
id: string;
name: string;
_self: string;
}
export interface CardProps {
name: string;
rarity: string;
type: string;
cost: number;
power: number;
health: number;
set: SetProps;
collectible: boolean;
soulSummon: number;
soulTrap: number;
text: string;
subtypes: string[];
attributes: string[];
keywords: string[];
unique: boolean;
imageUrl: string;
id: string;
}
interface LinkProps {
next?: string;
prev?: string;
}
export interface CardRequestProps {
cards: CardProps[];
_links: LinkProps;
_pageSize: number;
_totalCount: number;
}
export interface CardState {
cards: CardProps[];
next: string | null;
maxCards: number;
}
export type CardStateHandler = [CardState, Function];