github-folder-tree
Version:
github-folder-tree is a React custom hook that allows you to fetch and process the contents of a GitHub folder. It retrieves information about the files and subfolders in the specified folder, including their names, file types, download URLs, SHA hashes,
4 lines (3 loc) • 384 B
TypeScript
import { RepoFile } from '../types';
export declare const fetchFolderData: (folderUrl: string, setError: (error: string) => void, setLog: (log: string) => void, apiKey?: string) => Promise<any | null>;
export declare const processFolderContents: (folder: any[], setError: (error: string) => void, setLog: (log: string) => void, path?: string, apiKey?: string) => Promise<RepoFile[]>;