mirror of
https://github.com/ReVanced/revanced-website.git
synced 2026-01-19 01:03:56 +00:00
29 lines
490 B
TypeScript
29 lines
490 B
TypeScript
/// Types
|
|
|
|
export interface Document {
|
|
title: string;
|
|
// HTML
|
|
content: string;
|
|
}
|
|
|
|
export interface DocumentInfo {
|
|
title: string;
|
|
slug: string;
|
|
}
|
|
|
|
// A tree representing the `docs` folder.
|
|
export interface DocsTree {
|
|
// index.whatever
|
|
index: DocumentInfo;
|
|
// Everything except index.whatever
|
|
nodes: DocsTreeNode[];
|
|
}
|
|
|
|
export type DocsTreeNode = DocsTree | DocumentInfo;
|
|
|
|
/// Functions
|
|
|
|
export function is_tree(node: DocsTreeNode) {
|
|
return node.hasOwnProperty('nodes');
|
|
}
|