You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
51 lines
731 B
TypeScript
51 lines
731 B
TypeScript
5 years ago
|
interface KV<V> {
|
||
|
[key: string]: V;
|
||
|
}
|
||
|
|
||
5 years ago
|
interface TextNode {
|
||
|
type: 'text';
|
||
|
text: string;
|
||
|
}
|
||
|
|
||
|
interface SimpleNode {
|
||
|
type: string;
|
||
|
}
|
||
|
|
||
|
interface ContentNode {
|
||
5 years ago
|
type: string;
|
||
5 years ago
|
content: (ContentNode | TextNode | SimpleNode)[];
|
||
|
attrs?: object;
|
||
5 years ago
|
}
|
||
|
|
||
5 years ago
|
interface Card {
|
||
|
id: string;
|
||
|
name: string;
|
||
|
count: number;
|
||
|
tags: string[];
|
||
|
icon: string;
|
||
5 years ago
|
content: (ContentNode | SimpleNode)[];
|
||
5 years ago
|
backIcon?: string;
|
||
|
color?: string;
|
||
5 years ago
|
}
|
||
|
|
||
|
interface Deck {
|
||
|
id: string;
|
||
|
name: string;
|
||
|
description: string;
|
||
|
color: string;
|
||
|
icon: string;
|
||
|
cards: Card[];
|
||
|
cardWidth: number;
|
||
|
cardHeight: number;
|
||
|
titleFontSize?: number;
|
||
|
}
|
||
|
|
||
5 years ago
|
interface Settings {
|
||
|
color: string;
|
||
5 years ago
|
}
|
||
|
|
||
5 years ago
|
interface StoredStuff {
|
||
|
decks: Deck[];
|
||
|
defaults: Settings;
|
||
5 years ago
|
}
|