Skip to content
This repository was archived by the owner on Apr 21, 2018. It is now read-only.

Commit e9c4aa5

Browse files
committed
clarify api
1 parent a623376 commit e9c4aa5

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@ interface Selection {
3434
}
3535
```
3636

37-
The Provider really needs to be a `FormatterProvider`, It gets passed in `FormattingOptions` and returns a bunch of `CodeEdit[]` or a promise thereof.
37+
The Provider really needs to be a `FormatterProvider`. It needs to provide:
38+
* a selector for which it will work
39+
* a `getCodeEdits` function that gets passed in `FormattingOptions` and returns a bunch of `CodeEdit[]` or a promise thereof.
3840

3941
```ts
4042
interface FormattingOptions {
@@ -45,7 +47,7 @@ interface FormattingOptions {
4547
}
4648

4749
interface FormatterProvider {
48-
selector?: string;
50+
selector: string;
4951
disableForSelector?: string;
5052
getCodeEdits: (options: FormattingOptions) => CodeEdits[] | Promise<CodeEdit[]>;
5153
}

0 commit comments

Comments
 (0)