Add jsonObject parameter to callback and make callback required

This commit is contained in:
hinamiyagk
2016-02-03 22:47:24 +09:00
parent e69fe60f2d
commit 72d95b38f0
2 changed files with 8 additions and 8 deletions
+4 -4
View File
@@ -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);
+4 -4
View File
@@ -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;