// Type definitions for json-file-plus 3.3 // Project: https://github.com/ljharb/json-file-plus // Definitions by: Daniel Byrne // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped declare function readJSON(filename: string): Promise; declare namespace readJSON { function sync(filename: string): JSONFile; interface Format { readonly indent: number; readonly trailing: boolean; } class JSONData { format: Format; data: any; constructor(raw: string); get: (key: string) => Promise; set: (data: any) => void; remove: (key: string) => Promise; } class JSONFile extends JSONData { filename: string; constructor(filename: string, raw: string); save: (cb?: (err: Error) => void) => Promise; saveSync: () => void; } } export = readJSON;