hexo/node_modules/atomically/dist/index.d.ts

14 lines
822 B
TypeScript
Raw Normal View History

2023-09-25 15:58:56 +08:00
/// <reference types="node" />
import { Callback, Data, Path, ReadOptions, WriteOptions } from './types';
declare function readFile(filePath: Path, options: string | ReadOptions & {
encoding: string;
}): Promise<string>;
declare function readFile(filePath: Path, options?: ReadOptions): Promise<Buffer>;
declare function readFileSync(filePath: Path, options: string | ReadOptions & {
encoding: string;
}): string;
declare function readFileSync(filePath: Path, options?: ReadOptions): Buffer;
declare const writeFile: (filePath: Path, data: Data, options?: string | WriteOptions | Callback | undefined, callback?: Callback | undefined) => Promise<void>;
declare const writeFileSync: (filePath: Path, data: Data, options?: string | WriteOptions) => void;
export { readFile, readFileSync, writeFile, writeFileSync };