From 9768df4af35819bc9b33436de54d8b0d5e57048b Mon Sep 17 00:00:00 2001 From: Axetroy Date: Fri, 11 Oct 2019 14:12:05 +0800 Subject: [PATCH] update prettier type definition --- std/prettier/vendor/index.d.ts | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/std/prettier/vendor/index.d.ts b/std/prettier/vendor/index.d.ts index 354142746a7969..606c87a98428fd 100644 --- a/std/prettier/vendor/index.d.ts +++ b/std/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.