@@ -6,73 +6,73 @@ import type * as toc from 'mdast-util-toc';
66import type * as unified from 'unified' ;
77
88interface UnknownData {
9- [ key : string ] : unknown ;
9+ [ key : string ] : unknown ;
1010}
1111
1212export interface TOCData {
13- name : string ;
14- url : string ;
15- link : string | string [ ] ;
16- fragment : string ;
17- content : string ;
18- depth : number ;
13+ name : string ;
14+ url : string ;
15+ link : string | string [ ] ;
16+ fragment : string ;
17+ content : string ;
18+ depth : number ;
1919}
2020
2121interface FrontmatterData extends UnknownData {
22- title : string ;
23- description : string ;
24- keywords : string ;
25- author : string ;
22+ title : string ;
23+ description : string ;
24+ keywords : string ;
25+ author : string ;
2626}
2727
2828interface GbrData extends UnknownData {
29- url : string ;
30- notFound ?: boolean ;
31- isPageContent ?: boolean ;
29+ url : string ;
30+ notFound ?: boolean ;
31+ isPageContent ?: boolean ;
3232}
3333
3434export interface TOCOptions extends toc . TOCOptions {
35- minDepth ?: number ;
35+ minDepth ?: number ;
3636}
3737
3838export interface SectionData {
39- id : string ;
40- text : string ;
41- heading : string ;
42- source : string ;
43- depth : number ;
44- name : string ;
39+ id : string ;
40+ text : string ;
41+ heading : string ;
42+ source : string ;
43+ depth : number ;
44+ name : string ;
4545}
4646
4747interface VFileData extends UnknownData {
48- tocOptions ?: TOCOptions ;
49- tocSearch ?: TOCData [ ] ;
50- matter ?: FrontmatterData ;
51- title ?: string ;
52- gbr ?: GbrData ;
53- sections ?: SectionData [ ] ;
48+ tocOptions ?: TOCOptions ;
49+ tocSearch ?: TOCData [ ] ;
50+ matter ?: FrontmatterData ;
51+ title ?: string ;
52+ gbr ?: GbrData ;
53+ sections ?: SectionData [ ] ;
5454}
5555
5656export interface VFile extends vfile . VFile {
57- data : VFileData ;
57+ data : VFileData ;
5858}
5959
6060export function VFile ( doc : vfile . VFileCompatible ) : VFile {
61- return VFILE ( doc ) as VFile ;
61+ return VFILE ( doc ) as VFile ;
6262}
6363
6464export function isVfile ( x : unknown ) : x is VFile {
65- return x instanceof VFILE ;
65+ return x instanceof VFILE ;
6666}
6767
6868export function getBasePath ( _ : VFile ) {
69- return _ . history [ 0 ] ;
69+ return _ . history [ 0 ] ;
7070}
7171
7272export function getFullPath ( _ : VFile ) {
73- return join ( _ . cwd , _ . path ) ;
73+ return join ( _ . cwd , _ . path ) ;
7474}
7575
7676export interface Preset extends unified . Preset {
77- reporter ?: ( vfile : VFile ) => { } ;
77+ reporter ?: ( vfile : VFile ) => { } ;
7878}
0 commit comments