@types/jsonfile
- Version 6.1.4
- Published
- 5.63 kB
- 1 dependency
- MIT license
Install
npm i @types/jsonfile
yarn add @types/jsonfile
pnpm add @types/jsonfile
Overview
TypeScript definitions for jsonfile
Index
Functions
function readFile
readFile: { (file: Path, options: JFReadOptions, callback: ReadCallback): void; (file: any, callback: ReadCallback): void; (file: any, options?: JFReadOptions): Promise<any>;};
function readFileSync
readFileSync: (file: Path, options?: JFReadOptions) => any;
function writeFile
writeFile: { (file: Path, obj: any, options: JFWriteOptions, callback: WriteCallback): void; (file: any, obj: any, callback: WriteCallback): void; (file: any, obj: any, options?: JFWriteOptions): Promise<void>;};
function writeFileSync
writeFileSync: (file: Path, obj: any, options?: JFWriteOptions) => void;
Interfaces
interface FS
interface FS {}
property readFile
readFile: typeof fsReadFile;
property readFileSync
readFileSync: typeof fsReadFileSync;
property writeFile
writeFile: typeof fsWriteFile;
property writeFileSync
writeFileSync: typeof fsWriteFileSync;
Type Aliases
type JFReadOptions
type JFReadOptions = | { encoding?: string | null | undefined; flag?: string | undefined; throws?: boolean | undefined; fs?: FS | undefined; reviver?: ((key: any, value: any) => any) | undefined; } | string | null | undefined;
type JFWriteOptions
type JFWriteOptions = | { encoding?: string | null | undefined; mode?: string | number | undefined; flag?: string | undefined; fs?: FS | undefined; EOL?: string | undefined; spaces?: string | number | undefined; replacer?: ((key: string, value: any) => any) | undefined; } | string | null;
type Path
type Path = PathLike | Url;
type ReadCallback
type ReadCallback = (err: NodeJS.ErrnoException | null, data: any) => void;
type WriteCallback
type WriteCallback = (err: NodeJS.ErrnoException | null) => void;
Package Files (1)
Dependencies (1)
Dev Dependencies (0)
No dev dependencies.
Peer Dependencies (0)
No peer dependencies.
Badge
To add a badge like this oneto your package's README, use the codes available below.
You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@types/jsonfile
.
- Markdown[![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/@types/jsonfile)
- HTML<a href="https://www.jsdocs.io/package/@types/jsonfile"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>
- Updated .
Package analyzed in 2581 ms. - Missing or incorrect documentation? Open an issue for this package.