Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "fs/read-json/docs/types/index.d"

Index

Interfaces

Type aliases

Variables

Type aliases

Callback

Callback: (err: Error | null, file: Buffer | string) => void

Callback invoked upon reading a file.

param

error object

param

file contents

Type declaration

    • (err: Error | null, file: Buffer | string): void
    • Parameters

      • err: Error | null
      • file: Buffer | string

      Returns void

Reviver

Reviver: (key: string, value: any) => any

JSON transformation function.

param

key name

param

corresponding value

returns

updated value

Type declaration

    • (key: string, value: any): any
    • Parameters

      • key: string
      • value: any

      Returns any

Variables

Export assignment readJSON

readJSON: ReadJSON

Asynchronously reads a file as JSON.

param

file path or file descriptor

param

options

param

file encoding

param

file status flag

param

JSON reviver

param

callback