-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add TypeScript type definitions
Also add @types/prettier as dependency.
- Loading branch information
1 parent
fa6afea
commit 7b48524
Showing
2 changed files
with
30 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/** | ||
* @file Type definition for rollup-plugin-prettier | ||
*/ | ||
|
||
import type { Options as PrettierOptions } from "prettier"; | ||
import type { Plugin } from "rollup"; | ||
|
||
declare namespace prettier { | ||
interface Options extends PrettierOptions { | ||
/** | ||
* Directory to look for a Prettier config file. | ||
* | ||
* If omitted, defaults to `process.cwd()`. | ||
*/ | ||
cwd?: string; | ||
/** | ||
* Whether to generate a sourcemap. | ||
* | ||
* Note: This may take some time because rollup-plugin-prettier diffs the | ||
* output to manually generate a sourcemap. | ||
*/ | ||
sourcemap?: boolean; | ||
} | ||
} | ||
|
||
declare function prettier(options?: prettier.Options): Plugin; | ||
|
||
export = prettier; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters