Skip to content

Commit

Permalink
update prettier type definition (denoland/deno#3101)
Browse files Browse the repository at this point in the history
  • Loading branch information
axetroy authored and caspervonb committed Jan 24, 2021
1 parent 2242958 commit 96aca60
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion prettier/vendor/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
// Project: https://github.com/prettier/prettier, https://prettier.io
// Definitions by: Ika <https://github.com/ikatyang>,
// Ifiok Jr. <https://github.com/ifiokjr>,
// Florian Keller <https://github.com/ffflorian>
// Florian Keller <https://github.com/ffflorian>,
// Sosuke Suzuki <https://github.com/sosukesuzuki>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.8

Expand Down Expand Up @@ -256,6 +257,22 @@ export namespace resolveConfig {
function sync(filePath: string, options?: ResolveConfigOptions): null | Options;
}

/**
* `resolveConfigFile` can be used to find the path of the Prettier configuration file,
* that will be used when resolving the config (i.e. when calling `resolveConfig`).
*
* A promise is returned which will resolve to:
*
* - The path of the configuration file.
* - `null`, if no file was found.
*
* The promise will be rejected if there was an error parsing the configuration file.
*/
export function resolveConfigFile(filePath?: string): Promise<null | string>;
export namespace resolveConfigFile {
function sync(filePath?: string): null | string;
}

/**
* As you repeatedly call `resolveConfig`, the file system structure will be cached for performance. This function will clear the cache.
* Generally this is only needed for editor integrations that know that the file system has changed since the last format took place.
Expand Down

0 comments on commit 96aca60

Please sign in to comment.