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:
parent
e7562eed8c
commit
ab63e59817
1 changed files with 18 additions and 1 deletions
19
std/prettier/vendor/index.d.ts
vendored
19
std/prettier/vendor/index.d.ts
vendored
|
@ -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.
|
||||
|
|
Loading…
Add table
Reference in a new issue