mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-16 15:00:26 +00:00
Add jsonObject parameter to callback and make callback required
This commit is contained in:
@@ -75,10 +75,10 @@ fs.outputJSON(file, data, errorCallback);
|
||||
fs.outputJsonSync(file, data);
|
||||
fs.outputJSONSync(file, data);
|
||||
|
||||
fs.readJson(file, errorCallback);
|
||||
fs.readJson(file, openOpts, errorCallback);
|
||||
fs.readJSON(file, errorCallback);
|
||||
fs.readJSON(file, openOpts, errorCallback);
|
||||
fs.readJson(file, (error: Error, jsonObject: any) => {});
|
||||
fs.readJson(file, openOpts, (error: Error, jsonObject: any) => {});
|
||||
fs.readJSON(file, (error: Error, jsonObject: any) => {});
|
||||
fs.readJSON(file, openOpts, (error: Error, jsonObject: any) => {});
|
||||
|
||||
fs.readJsonSync(file, openOpts);
|
||||
fs.readJSONSync(file, openOpts);
|
||||
|
||||
Vendored
+4
-4
@@ -65,10 +65,10 @@ declare module "fs-extra" {
|
||||
export function outputJsonSync(file: string, data: any): void;
|
||||
export function outputJSONSync(file: string, data: any): void;
|
||||
|
||||
export function readJson(file: string, callback?: (err: Error) => void): void;
|
||||
export function readJson(file: string, options?: OpenOptions, callback?: (err: Error) => void): void;
|
||||
export function readJSON(file: string, callback?: (err: Error) => void): void;
|
||||
export function readJSON(file: string, options?: OpenOptions, callback?: (err: Error) => void): void;
|
||||
export function readJson(file: string, callback: (err: Error, jsonObject: any) => void): void;
|
||||
export function readJson(file: string, options: OpenOptions, callback: (err: Error, jsonObject: any) => void): void;
|
||||
export function readJSON(file: string, callback: (err: Error, jsonObject: any) => void): void;
|
||||
export function readJSON(file: string, options: OpenOptions, callback: (err: Error, jsonObject: any) => void): void;
|
||||
|
||||
export function readJsonSync(file: string, options?: OpenOptions): any;
|
||||
export function readJSONSync(file: string, options?: OpenOptions): any;
|
||||
|
||||
Reference in New Issue
Block a user