0
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-03-03 09:31:22 -05:00

update prettier type definition (#3101)

This commit is contained in:
罗文 2019-10-11 21:38:04 +08:00 committed by Ryan Dahl
parent e7562eed8c
commit ab63e59817

View file

@ -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
@ -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.