mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-23 04:49:15 +08:00
25 lines
577 B
TypeScript
25 lines
577 B
TypeScript
// Type definitions for load-json-file 2.0
|
|
// Project: https://github.com/sindresorhus/load-json-file
|
|
// Definitions by: Sam Verschueren <https://github.com/SamVerschueren>
|
|
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
|
|
interface LoadJsonFile {
|
|
/**
|
|
* Returns a promise for the parsed JSON.
|
|
*
|
|
* @param filepath
|
|
*/
|
|
(filepath: string): Promise<any>;
|
|
|
|
/**
|
|
* Returns the parsed JSON.
|
|
*
|
|
* @param filepath
|
|
*/
|
|
sync(filepath: string): any;
|
|
}
|
|
|
|
declare const loadJsonFile: LoadJsonFile;
|
|
|
|
export = loadJsonFile;
|