Skip to content

Commit

Permalink
Fix the return type of format: string -> Promise<string>
Browse files Browse the repository at this point in the history
  • Loading branch information
IronBlood committed May 25, 2022
1 parent 26a574c commit ae3227c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ module.exports = format;
* @param {String} options.logLevel - the level for the logs
* (error, warn, info, debug, trace)
* @param {Boolean} options.prettierLast - Run Prettier Last
* @return {String} - the formatted string
* @return {Promise<String>} - the formatted string
*/
async function format(options) {
const { logLevel = getDefaultLogLevel() } = options;
Expand Down
2 changes: 1 addition & 1 deletion types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,6 @@ declare namespace format {
* supplied configuration. The auto-formatting is limited to the issues that
* Prettier and ESLint can automatically fix.
*/
declare function format(options: format.Options): string;
declare function format(options: format.Options): Promise<string>;

export = format;

0 comments on commit ae3227c

Please # to comment.