Skip to content

Instantly share code, notes, and snippets.

@lighth7015
Created June 26, 2020 21:28
Show Gist options
  • Save lighth7015/a9a9dd29c6cc732ff52e8ae384684536 to your computer and use it in GitHub Desktop.
Save lighth7015/a9a9dd29c6cc732ff52e8ae384684536 to your computer and use it in GitHub Desktop.
export interface TableInfo {
tableId: string;
columns: Array<string>;
}
export interface StorageInfo {
[key: string]: string | TableInfo;
}
interface PageInfo {
title?: string;
subtitle: string;
}
interface PanelInfo {
title: string;
subtext: string;
content: Array<string>;
}
interface ThemeSection {
[key: string]: string | number;
}
interface ThemeInfo {
[key: string]: string | number | ThemeSection;
}
interface SiteMeta {
page: PageInfo;
theme: ThemeInfo;
// Anything else that I decide should go in here, lol
[key: string]: unknown | string;
}
interface SiteInfo {
title: string;
fetch: string;
siteInfo: SiteMeta;
storage: StorageInfo;
}
interface PageMetadata {
[key: string]: string | unknown;
}
export interface PageContent {
caption: string;
heading: string;
section: Array<string>;
}
interface ThemeProps {
theme: Theme;
}
type ListOfPageContent = Array<PageContent>;
type PageContentIterator = (T: Record<string, unknown>) =>
(collection: ListOfPageContent, payload: Array<string>, index: number ) => ListOfPageContent;
export interface ApplicationState {
contents: Array<PageContent>;
itemsPer: number;
rowCount: number;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment