From 96aca604921ca868157311d0f0e1d559b0f1cc66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BD=97=E6=96=87?= Date: Fri, 11 Oct 2019 21:38:04 +0800 Subject: [PATCH] update prettier type definition (denoland/deno#3101) --- prettier/vendor/index.d.ts | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/prettier/vendor/index.d.ts b/prettier/vendor/index.d.ts index 354142746a79..606c87a98428 100644 --- a/prettier/vendor/index.d.ts +++ b/prettier/vendor/index.d.ts @@ -2,7 +2,8 @@ // Project: https://github.com/prettier/prettier, https://prettier.io // Definitions by: Ika , // Ifiok Jr. , -// Florian Keller +// Florian Keller , +// Sosuke Suzuki // 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; +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.