summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author罗文 <axetroy.dev@gmail.com>2019-10-11 21:38:04 +0800
committerRyan Dahl <ry@tinyclouds.org>2019-10-11 06:38:04 -0700
commitab63e598176a778691b3db64b559934b885ec3bf (patch)
treea6b33a5382ae9caa2cef02478a9776887f3a5224
parente7562eed8c816cd0d97aab6b818d7c8453dbaa2b (diff)
update prettier type definition (#3101)
-rw-r--r--std/prettier/vendor/index.d.ts19
1 files changed, 18 insertions, 1 deletions
diff --git a/std/prettier/vendor/index.d.ts b/std/prettier/vendor/index.d.ts
index 354142746..606c87a98 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 <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
@@ -257,6 +258,22 @@ export namespace resolveConfig {
}
/**
+ * `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.
*/