|
1 | 1 | // TypeScript Version: 3.0 |
2 | 2 | import {Node} from 'unist' |
3 | 3 |
|
4 | | -export = inpect |
| 4 | +declare namespace unistUtilInspect { |
| 5 | + interface UnistUtilInspectOptions { |
| 6 | + /** |
| 7 | + * Whether to include position information. |
| 8 | + * |
| 9 | + * @defaultValue true |
| 10 | + */ |
| 11 | + showPositions?: boolean |
| 12 | + } |
5 | 13 |
|
6 | | -/* |
7 | | - * Unist utility to inspect the details of a Unist Node |
8 | | - * |
9 | | - * @param node Node to inspect |
10 | | - */ |
11 | | -declare function inpect(node: Node): string |
12 | | - |
13 | | -declare namespace inpect { |
14 | 14 | /** |
15 | 15 | * Inspect the given Node and include colors from the results |
16 | 16 | * |
17 | 17 | * @param node Node to inspect |
| 18 | + * @param options Configuration |
18 | 19 | */ |
19 | | - function color(node: Node): string |
| 20 | + function color(node: Node, options?: Partial<UnistUtilInspectOptions>): string |
20 | 21 |
|
21 | 22 | /** |
22 | 23 | * Inspect the given Node and exclude colors from the results |
23 | 24 | * |
24 | 25 | * @param node Node to inspect |
| 26 | + * @param options Configuration |
25 | 27 | */ |
26 | | - function noColor(node: Node): string |
| 28 | + function noColor( |
| 29 | + node: Node, |
| 30 | + options?: Partial<UnistUtilInspectOptions> |
| 31 | + ): string |
27 | 32 | } |
| 33 | + |
| 34 | +/* |
| 35 | + * Unist utility to inspect the details of a Unist Node |
| 36 | + * |
| 37 | + * @param node Node to inspect |
| 38 | + * @param options Configuration |
| 39 | + */ |
| 40 | +declare function unistUtilInspect( |
| 41 | + node: Node, |
| 42 | + options?: Partial<unistUtilInspect.UnistUtilInspectOptions> |
| 43 | +): string |
| 44 | + |
| 45 | +export = unistUtilInspect |
0 commit comments