UNPKG

@ts-for-gir/lib

Version:

Typescript .d.ts generator from GIR for gjs

22 lines (21 loc) 765 B
import { FileInfo } from '../types/index.js'; export { inspect } from 'util'; /** * Asynchronously checks if a file exists * @param filePath The path to the file * @returns A promise that resolves to true if the file exists, false otherwise */ export declare const fileExists: (filePath: string) => Promise<boolean>; /** * Find a file in a list of directories * @param dirs The directories to search in * @param filename The filename to search for * @returns The file info */ export declare const findFilesInDirs: (dirs: string[], filename: string) => Promise<FileInfo[]>; /** * Read a JSON file * @param filePath The path to the JSON file * @returns The parsed JSON */ export declare const readJsonFile: <T = unknown>(filePath: string) => Promise<T>;