Project Files
src / node-shims.d.ts
declare module "fs" {
export function existsSync(path: string): boolean;
export function readFileSync(path: string, options?: any): string;
export function writeFileSync(path: string, data: any, options?: any): void;
export function readdirSync(path: string, options?: any): any[];
export function statSync(path: string): any;
export function unlinkSync(path: string): void;
export function renameSync(oldPath: string, newPath: string): void;
export function mkdirSync(path: string, options?: any): void;
const fs: any;
export default fs;
}
declare module "fs/promises" {
export function readFile(path: string, options?: any): Promise<string>;
export function writeFile(path: string, data: any, options?: any): Promise<void>;
export function appendFile(path: string, data: any, options?: any): Promise<void>;
export function readdir(path: string, options?: any): Promise<any[]>;
export function stat(path: string): Promise<any>;
export function mkdir(path: string, options?: any): Promise<void>;
export function unlink(path: string): Promise<void>;
export function rename(oldPath: string, newPath: string): Promise<void>;
const fs: any;
export default fs;
}
declare module "path" {
export function resolve(...paths: string[]): string;
export function join(...paths: string[]): string;
export function dirname(path: string): string;
export function relative(from: string, to: string): string;
export const sep: string;
const path: any;
export default path;
}
declare module "crypto" {
export function randomUUID(): string;
}
declare const process: {
exit(code?: number): void;
cwd(): string;
};